mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-18 03:41:50 +03:00
6d20c8b4fc
The directory version number is the soversion of the library.
62 lines
1.2 KiB
CMake
62 lines
1.2 KiB
CMake
project(modules)
|
|
|
|
find_package(Libsmbclient REQUIRED)
|
|
find_package(LIBSSH)
|
|
|
|
set(PLUGIN_VERSION_INSTALL_DIR "${PLUGIN_INSTALL_DIR}-${LIBRARY_SOVERSION}")
|
|
|
|
set(MODULES_PUBLIC_INCLUDE_DIRS
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
CACHE INTERNAL "modules include directories"
|
|
)
|
|
|
|
set(MODULES_PRIVATE_INCLUDE_DIRS
|
|
${CSTDLIB_PUBLIC_INCLUDE_DIRS}
|
|
${CSYNC_PUBLIC_INCLUDE_DIRS}
|
|
${LIBSMBCLIENT_INCLUDE_DIRS}
|
|
)
|
|
|
|
set(SMB_PLUGIN
|
|
csync_smb
|
|
)
|
|
|
|
set(SFTP_PLUGIN
|
|
csync_sftp
|
|
)
|
|
|
|
include_directories(
|
|
${MODULES_PUBLIC_INCLUDE_DIRS}
|
|
${MODULES_PRIVATE_INCLUDE_DIRS}
|
|
)
|
|
|
|
macro_add_plugin(${SMB_PLUGIN} csync_smb.c)
|
|
target_link_libraries(${SMB_PLUGIN} ${CSTDLIB_LIBRARY} ${LIBSMBCLIENT_LIBRARIES})
|
|
|
|
install(
|
|
TARGETS
|
|
${SMB_PLUGIN}
|
|
DESTINATION
|
|
${PLUGIN_VERSION_INSTALL_DIR}
|
|
)
|
|
|
|
macro_add_plugin(csync_dummy csync_dummy.c)
|
|
|
|
if (LIBSSH_FOUND)
|
|
macro_add_plugin(${SFTP_PLUGIN} csync_sftp.c)
|
|
target_link_libraries(${SFTP_PLUGIN} ${CSTDLIB_LIBRARY} ${LIBSSH_LIBRARIES})
|
|
|
|
install(
|
|
TARGETS
|
|
${SFTP_PLUGIN}
|
|
DESTINATION
|
|
${PLUGIN_VERSION_INSTALL_DIR}
|
|
)
|
|
endif (LIBSSH_FOUND)
|
|
|
|
|
|
# create test file as bad plugin for the vio testcase
|
|
file(WRITE
|
|
${CMAKE_CURRENT_BINARY_DIR}/csync_bad.so
|
|
"bad plugin"
|
|
)
|
|
|