2020-02-10 16:35:27 +00:00
|
|
|
if(NOT WITHOUT_ADAPTER)
|
|
|
|
|
|
|
|
pkg_check_modules(FUSE3 REQUIRED fuse3)
|
|
|
|
pkg_check_modules(UUID REQUIRED uuid)
|
|
|
|
|
|
|
|
add_library(webfuse-adapter-static STATIC
|
|
|
|
lib/webfuse/adapter/api.c
|
|
|
|
lib/webfuse/adapter/impl/filesystem.c
|
|
|
|
lib/webfuse/adapter/impl/server.c
|
|
|
|
lib/webfuse/adapter/impl/server_config.c
|
|
|
|
lib/webfuse/adapter/impl/server_protocol.c
|
|
|
|
lib/webfuse/adapter/impl/session.c
|
|
|
|
lib/webfuse/adapter/impl/session_manager.c
|
|
|
|
lib/webfuse/adapter/impl/authenticator.c
|
|
|
|
lib/webfuse/adapter/impl/authenticators.c
|
|
|
|
lib/webfuse/adapter/impl/credentials.c
|
|
|
|
lib/webfuse/adapter/impl/operations.c
|
2020-02-15 14:11:35 +00:00
|
|
|
lib/webfuse/adapter/impl/mountpoint.c
|
2020-02-16 20:03:17 +00:00
|
|
|
lib/webfuse/adapter/impl/mountpoint_factory.c
|
2020-02-16 03:02:23 +00:00
|
|
|
lib/webfuse/adapter/impl/uuid_mountpoint_factory.c
|
|
|
|
lib/webfuse/adapter/impl/uuid_mountpoint.c
|
2020-02-10 16:35:27 +00:00
|
|
|
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
|
|
|
|
lib/webfuse/adapter/impl/operation/open.c
|
|
|
|
lib/webfuse/adapter/impl/operation/close.c
|
|
|
|
lib/webfuse/adapter/impl/operation/read.c
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(webfuse-adapter-static PRIVATE
|
|
|
|
lib
|
2020-02-29 01:44:26 +00:00
|
|
|
lib/jsonrpc/include
|
2020-02-10 16:35:27 +00:00
|
|
|
${FUSE3_INCLUDE_DIRS}
|
|
|
|
${UUID_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_options(webfuse-adapter-static PUBLIC
|
|
|
|
${FUSE3_CFLAGS_OTHER}
|
|
|
|
${UUID_CFLAGS_OTHER}
|
|
|
|
)
|
|
|
|
|
|
|
|
set_target_properties(webfuse-adapter-static PROPERTIES OUTPUT_NAME webfuse-adapter)
|
|
|
|
set_target_properties(webfuse-adapter-static PROPERTIES C_VISIBILITY_PRESET hidden)
|
|
|
|
|
|
|
|
add_library(webfuse-adapter SHARED
|
|
|
|
lib/webfuse/adapter/api.c
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(webfuse-adapter PRIVATE
|
|
|
|
${FUSE3_INCLUDE_DIRS}
|
|
|
|
${UUID_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_options(webfuse-adapter PUBLIC
|
|
|
|
${FUSE3_CFLAGS_OTHER}
|
|
|
|
${UUID_CFLAGS_OTHER}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
set_target_properties(webfuse-adapter PROPERTIES VERSION ${PROJECT_VERSION})
|
|
|
|
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")
|
|
|
|
|
2020-02-28 22:17:41 +00:00
|
|
|
target_link_libraries(webfuse-adapter PRIVATE webfuse-adapter-static webfuse-core jsonrpc)
|
2020-02-10 16:35:27 +00:00
|
|
|
|
|
|
|
file(WRITE "${PROJECT_BINARY_DIR}/libwebfuse-adapter.pc"
|
|
|
|
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
|
|
|
|
|
|
|
|
exec_prefix=\${prefix}
|
|
|
|
libdir=\${exec_prefix}/lib${LIB_SUFFIX}
|
|
|
|
includedir=\${prefix}/include
|
|
|
|
Name: libwebfuse
|
|
|
|
Description: Websockets filesystem server library
|
|
|
|
Version: ${PROJECT_VERSION}
|
|
|
|
|
|
|
|
Libs: -L\${libdir} -lwebfuse-adapter -l${FUSE3_LIBRARIES} -l${LWS_LIBRARIES} -l${JANSSON_LIBRARIES}
|
|
|
|
Cflags: -I\${includedir}"
|
|
|
|
)
|
|
|
|
|
2020-02-11 21:23:51 +00:00
|
|
|
install(TARGETS webfuse-adapter DESTINATION lib${LIB_SUFFIX} COMPONENT libraries)
|
|
|
|
install(FILES "${PROJECT_BINARY_DIR}/libwebfuse-adapter.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT libraries)
|
|
|
|
|
|
|
|
install(FILES include/webfuse_adapter.h DESTINATION include COMPONENT headers)
|
|
|
|
install(DIRECTORY include/webfuse/adapter DESTINATION include/webfuse COMPONENT headers)
|
2020-02-10 16:35:27 +00:00
|
|
|
|
|
|
|
endif(NOT WITHOUT_ADAPTER)
|