mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
78 lines
1.5 KiB
CMake
78 lines
1.5 KiB
CMake
project(modules C)
|
|
|
|
find_package(Libsmbclient REQUIRED)
|
|
find_package(LibSSH 0.4.0)
|
|
find_package(Neon)
|
|
|
|
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
|
|
)
|
|
|
|
set(WEBDAV_PLUGIN
|
|
csync_webdav
|
|
)
|
|
|
|
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)
|
|
|
|
if (NEON_FOUND)
|
|
macro_add_plugin(${WEBDAV_PLUGIN} csync_webdav.c)
|
|
target_link_libraries(${WEBDAV_PLUGIN} ${CSTDLIB_LIBRARY} ${NEON_LIBRARY})
|
|
|
|
install(
|
|
TARGETS
|
|
${WEBDAV_PLUGIN}
|
|
DESTINATION
|
|
${PLUGIN_VERSION_INSTALL_DIR}
|
|
)
|
|
endif (NEON_FOUND)
|
|
|
|
# create test file as bad plugin for the vio testcase
|
|
file(WRITE
|
|
${CMAKE_CURRENT_BINARY_DIR}/csync_bad.so
|
|
"bad plugin"
|
|
)
|
|
|