mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
refactor: made jsonrpc an independent library
This commit is contained in:
13
cmake/jsonrpc.cmake
Normal file
13
cmake/jsonrpc.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
# jsonrpc
|
||||
|
||||
add_library(jsonrpc STATIC
|
||||
lib/jsonrpc/proxy.c
|
||||
lib/jsonrpc/server.c
|
||||
lib/jsonrpc/method.c
|
||||
lib/jsonrpc/request.c
|
||||
lib/jsonrpc/response.c
|
||||
lib/jsonrpc/error.c
|
||||
)
|
||||
|
||||
target_include_directories(jsonrpc PUBLIC lib)
|
||||
set_target_properties(jsonrpc PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
@@ -7,6 +7,13 @@ include(GoogleTest)
|
||||
pkg_check_modules(GMOCK gmock)
|
||||
|
||||
add_executable(alltests
|
||||
test/jsonrpc/test_util.cc
|
||||
test/jsonrpc/test_is_request.cc
|
||||
test/jsonrpc/test_request.cc
|
||||
test/jsonrpc/test_is_response.cc
|
||||
test/jsonrpc/test_response.cc
|
||||
test/jsonrpc/test_server.cc
|
||||
test/jsonrpc/test_proxy.cc
|
||||
test/webfuse/utils/tempdir.cc
|
||||
test/webfuse/utils/file_utils.cc
|
||||
test/webfuse/utils/msleep.cc
|
||||
@@ -37,13 +44,6 @@ add_executable(alltests
|
||||
test/webfuse/tests/adapter/test_uuid_mountpoint.cc
|
||||
test/webfuse/tests/adapter/test_uuid_mountpoint_factory.cc
|
||||
test/webfuse/tests/adapter/test_fuse_req.cc
|
||||
test/webfuse/tests/adapter/jsonrpc/test_util.cc
|
||||
test/webfuse/tests/adapter/jsonrpc/test_is_request.cc
|
||||
test/webfuse/tests/adapter/jsonrpc/test_request.cc
|
||||
test/webfuse/tests/adapter/jsonrpc/test_is_response.cc
|
||||
test/webfuse/tests/adapter/jsonrpc/test_response.cc
|
||||
test/webfuse/tests/adapter/jsonrpc/test_server.cc
|
||||
test/webfuse/tests/adapter/jsonrpc/test_proxy.cc
|
||||
test/webfuse/tests/provider/test_url.cc
|
||||
test/webfuse/tests/provider/test_client_protocol.cc
|
||||
test/webfuse/tests/integration/test_integration.cc
|
||||
@@ -65,6 +65,7 @@ target_link_libraries(alltests PUBLIC
|
||||
webfuse-adapter-static
|
||||
webfuse-provider-static
|
||||
webfuse-core
|
||||
jsonrpc
|
||||
${FUSE3_LIBRARIES}
|
||||
${LWS_LIBRARIES}
|
||||
${JANSSON_LIBRARIES}
|
||||
|
||||
@@ -28,12 +28,6 @@ add_library(webfuse-adapter-static STATIC
|
||||
lib/webfuse/adapter/impl/operation/open.c
|
||||
lib/webfuse/adapter/impl/operation/close.c
|
||||
lib/webfuse/adapter/impl/operation/read.c
|
||||
lib/webfuse/adapter/impl/jsonrpc/proxy.c
|
||||
lib/webfuse/adapter/impl/jsonrpc/server.c
|
||||
lib/webfuse/adapter/impl/jsonrpc/method.c
|
||||
lib/webfuse/adapter/impl/jsonrpc/request.c
|
||||
lib/webfuse/adapter/impl/jsonrpc/response.c
|
||||
lib/webfuse/adapter/impl/jsonrpc/util.c
|
||||
)
|
||||
|
||||
target_include_directories(webfuse-adapter-static PRIVATE
|
||||
@@ -70,7 +64,7 @@ set_target_properties(webfuse-adapter PROPERTIES SOVERSION 0)
|
||||
set_target_properties(webfuse-adapter PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(webfuse-adapter PROPERTIES COMPILE_DEFINITIONS "WF_API=WF_EXPORT")
|
||||
|
||||
target_link_libraries(webfuse-adapter PRIVATE webfuse-adapter-static webfuse-core)
|
||||
target_link_libraries(webfuse-adapter PRIVATE webfuse-adapter-static webfuse-core jsonrpc)
|
||||
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/libwebfuse-adapter.pc"
|
||||
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
|
||||
|
||||
@@ -8,6 +8,7 @@ add_library(webfuse-core STATIC
|
||||
lib/webfuse/core/string.c
|
||||
lib/webfuse/core/base64.c
|
||||
lib/webfuse/core/lws_log.c
|
||||
lib/webfuse/core/json_util.c
|
||||
)
|
||||
|
||||
set_target_properties(webfuse-core PROPERTIES OUTPUT_NAME webfuse-core)
|
||||
|
||||
Reference in New Issue
Block a user