mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
refactor: extracted timer function of adapter into separate library
This commit is contained in:
@@ -10,10 +10,16 @@ add_library(jsonrpc STATIC
|
||||
lib/jsonrpc/src/jsonrpc/impl/error.c
|
||||
)
|
||||
|
||||
target_include_directories(jsonrpc PUBLIC
|
||||
lib/jsonrpc/include
|
||||
target_link_libraries(jsonrpc PUBLIC wf_timer)
|
||||
|
||||
target_include_directories(jsonrpc PRIVATE
|
||||
lib/wf/timer/include
|
||||
lib/jsonrpc/src
|
||||
lib
|
||||
)
|
||||
|
||||
target_include_directories(jsonrpc PUBLIC
|
||||
lib/jsonrpc/include
|
||||
)
|
||||
|
||||
set_target_properties(jsonrpc PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
|
||||
@@ -15,6 +15,8 @@ add_executable(alltests
|
||||
lib/jsonrpc/test/jsonrpc/test_server.cc
|
||||
lib/jsonrpc/test/jsonrpc/test_proxy.cc
|
||||
lib/jsonrpc/test/jsonrpc/test_response_parser.cc
|
||||
lib/wf/timer/test/wf/timer/test_timepoint.cc
|
||||
lib/wf/timer/test/wf/timer/test_timer.cc
|
||||
test/webfuse/utils/tempdir.cc
|
||||
test/webfuse/utils/file_utils.cc
|
||||
test/webfuse/utils/msleep.cc
|
||||
@@ -35,8 +37,6 @@ add_executable(alltests
|
||||
test/webfuse/tests/core/test_message_queue.cc
|
||||
test/webfuse/tests/adapter/test_server.cc
|
||||
test/webfuse/tests/adapter/test_server_config.cc
|
||||
test/webfuse/tests/adapter/test_timepoint.cc
|
||||
test/webfuse/tests/adapter/test_timer.cc
|
||||
test/webfuse/tests/adapter/test_credentials.cc
|
||||
test/webfuse/tests/adapter/test_authenticator.cc
|
||||
test/webfuse/tests/adapter/test_authenticators.cc
|
||||
@@ -53,6 +53,9 @@ add_executable(alltests
|
||||
|
||||
target_include_directories(alltests PRIVATE
|
||||
lib/jsonrpc/include
|
||||
lib/jsonrpc/src
|
||||
lib/wf/timer/include
|
||||
lib/wf/timer/src
|
||||
${FUSE3_INCLUDE_DIRS}
|
||||
${UUID_INCLUDE_DIRS}
|
||||
)
|
||||
@@ -67,6 +70,7 @@ target_link_libraries(alltests PUBLIC
|
||||
webfuse-provider-static
|
||||
webfuse-core
|
||||
jsonrpc
|
||||
wf_timer
|
||||
${FUSE3_LIBRARIES}
|
||||
${LWS_LIBRARIES}
|
||||
${JANSSON_LIBRARIES}
|
||||
|
||||
@@ -19,9 +19,6 @@ add_library(webfuse-adapter-static STATIC
|
||||
lib/webfuse/adapter/impl/mountpoint_factory.c
|
||||
lib/webfuse/adapter/impl/uuid_mountpoint_factory.c
|
||||
lib/webfuse/adapter/impl/uuid_mountpoint.c
|
||||
lib/webfuse/adapter/impl/time/timepoint.c
|
||||
lib/webfuse/adapter/impl/time/timer.c
|
||||
lib/webfuse/adapter/impl/time/timeout_manager.c
|
||||
lib/webfuse/adapter/impl/operation/lookup.c
|
||||
lib/webfuse/adapter/impl/operation/getattr.c
|
||||
lib/webfuse/adapter/impl/operation/readdir.c
|
||||
@@ -32,6 +29,7 @@ add_library(webfuse-adapter-static STATIC
|
||||
|
||||
target_include_directories(webfuse-adapter-static PRIVATE
|
||||
lib
|
||||
lib/wf/timer/include
|
||||
lib/jsonrpc/include
|
||||
${FUSE3_INCLUDE_DIRS}
|
||||
${UUID_INCLUDE_DIRS}
|
||||
@@ -65,7 +63,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 jsonrpc)
|
||||
target_link_libraries(webfuse-adapter PRIVATE webfuse-adapter-static webfuse-core jsonrpc wf_timer)
|
||||
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/libwebfuse-adapter.pc"
|
||||
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
|
||||
|
||||
18
cmake/wf_timer.cmake
Normal file
18
cmake/wf_timer.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
# timer
|
||||
|
||||
add_library(wf_timer STATIC
|
||||
lib/wf/timer/src/wf/timer/api.c
|
||||
lib/wf/timer/src/wf/timer/impl/manager.c
|
||||
lib/wf/timer/src/wf/timer/impl/timepoint.c
|
||||
lib/wf/timer/src/wf/timer/impl/timer.c
|
||||
)
|
||||
|
||||
target_include_directories(wf_timer PRIVATE
|
||||
lib/wf/timer/src
|
||||
)
|
||||
|
||||
target_include_directories(wf_timer PUBLIC
|
||||
lib/wf/timer/include
|
||||
)
|
||||
|
||||
set_target_properties(wf_timer PROPERTIES C_VISIBILITY_PRESET hidden)
|
||||
Reference in New Issue
Block a user