2020-02-10 16:35:27 +00:00
|
|
|
if(NOT WITHOUT_PROVIDER)
|
|
|
|
|
|
|
|
add_library(webfuse-provider-static STATIC
|
|
|
|
lib/webfuse/provider/api.c
|
|
|
|
lib/webfuse/provider/impl/url.c
|
|
|
|
lib/webfuse/provider/impl/client.c
|
|
|
|
lib/webfuse/provider/impl/client_config.c
|
|
|
|
lib/webfuse/provider/impl/client_protocol.c
|
|
|
|
lib/webfuse/provider/impl/provider.c
|
|
|
|
lib/webfuse/provider/impl/request.c
|
|
|
|
lib/webfuse/provider/impl/dirbuffer.c
|
2020-02-25 21:05:48 +00:00
|
|
|
lib/webfuse/provider/impl/credentials.c
|
2020-02-10 16:35:27 +00:00
|
|
|
lib/webfuse/provider/impl/operation/lookup.c
|
|
|
|
lib/webfuse/provider/impl/operation/getattr.c
|
|
|
|
lib/webfuse/provider/impl/operation/readdir.c
|
|
|
|
lib/webfuse/provider/impl/operation/open.c
|
|
|
|
lib/webfuse/provider/impl/operation/close.c
|
|
|
|
lib/webfuse/provider/impl/operation/read.c
|
|
|
|
)
|
|
|
|
|
|
|
|
set_target_properties(webfuse-provider-static PROPERTIES OUTPUT_NAME webfuse-provider)
|
|
|
|
set_target_properties(webfuse-provider-static PROPERTIES C_VISIBILITY_PRESET hidden)
|
2020-03-01 18:08:39 +00:00
|
|
|
target_include_directories(webfuse-provider-static PRIVATE
|
2020-03-01 00:13:24 +00:00
|
|
|
lib
|
|
|
|
)
|
2020-02-10 16:35:27 +00:00
|
|
|
|
|
|
|
add_library(webfuse-provider SHARED
|
|
|
|
lib/webfuse/provider/api.c
|
|
|
|
)
|
|
|
|
|
|
|
|
set_target_properties(webfuse-provider PROPERTIES VERSION ${PROJECT_VERSION})
|
|
|
|
set_target_properties(webfuse-provider PROPERTIES SOVERSION 0)
|
|
|
|
set_target_properties(webfuse-provider PROPERTIES C_VISIBILITY_PRESET hidden)
|
|
|
|
set_target_properties(webfuse-provider PROPERTIES COMPILE_DEFINITIONS "WFP_API=WFP_EXPORT")
|
|
|
|
|
|
|
|
target_include_directories(webfuse-provider PUBLIC lib)
|
2020-03-29 15:40:33 +00:00
|
|
|
target_link_libraries(webfuse-provider PRIVATE webfuse-provider-static webfuse-core)
|
2020-02-10 16:35:27 +00:00
|
|
|
|
|
|
|
file(WRITE "${PROJECT_BINARY_DIR}/libwebfuse-provider.pc"
|
|
|
|
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
|
|
|
|
exec_prefix=\${prefix}
|
|
|
|
libdir=\${exec_prefix}/lib${LIB_SUFFIX}
|
|
|
|
includedir=\${prefix}/include
|
|
|
|
Name: libwebfuse-provider
|
|
|
|
Description: Provider library for websockets filesystem
|
|
|
|
Version: ${PROJECT_VERSION}
|
|
|
|
|
|
|
|
Libs: -L\${libdir} -lwebfuse-provider -l${LWS_LIBRARIES} -l${JANSSON_LIBRARIES}
|
|
|
|
Cflags: -I\${includedir}"
|
|
|
|
)
|
|
|
|
|
2020-02-11 21:23:51 +00:00
|
|
|
install(TARGETS webfuse-provider DESTINATION lib${LIB_SUFFIX} COMPONENT libraries)
|
|
|
|
install(FILES "${PROJECT_BINARY_DIR}/libwebfuse-provider.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT libraries)
|
|
|
|
|
|
|
|
install(FILES include/webfuse_provider.h DESTINATION include COMPONENT headers)
|
|
|
|
install(DIRECTORY include/webfuse/provider DESTINATION include/webfuse COMPONENT headers)
|
2020-02-10 16:35:27 +00:00
|
|
|
|
|
|
|
endif(NOT WITHOUT_PROVIDER)
|