nextcloud-desktop/modules/CMakeLists.txt
Andreas Schneider 6d20c8b4fc Install the modules to a version directory.
The directory version number is the soversion of the library.
2008-12-16 15:03:57 +01:00

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"
)