2009-03-18 12:55:14 +03:00
|
|
|
project(modules C)
|
2008-04-07 19:16:41 +04:00
|
|
|
|
2012-01-25 02:44:52 +04:00
|
|
|
find_package(Libsmbclient)
|
2010-02-15 13:55:48 +03:00
|
|
|
find_package(LibSSH 0.4.0)
|
2011-09-11 12:16:30 +04:00
|
|
|
find_package(Neon)
|
2008-04-07 19:16:41 +04:00
|
|
|
|
2008-12-16 17:03:57 +03:00
|
|
|
set(PLUGIN_VERSION_INSTALL_DIR "${PLUGIN_INSTALL_DIR}-${LIBRARY_SOVERSION}")
|
|
|
|
|
2008-04-07 19:16:41 +04:00
|
|
|
set(MODULES_PUBLIC_INCLUDE_DIRS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2008-05-09 12:56:38 +04:00
|
|
|
CACHE INTERNAL "modules include directories"
|
2008-04-07 19:16:41 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(MODULES_PRIVATE_INCLUDE_DIRS
|
|
|
|
${CSTDLIB_PUBLIC_INCLUDE_DIRS}
|
|
|
|
${CSYNC_PUBLIC_INCLUDE_DIRS}
|
2013-01-29 17:58:54 +04:00
|
|
|
${HTTPBF_PUBLIC_INCLUDE_DIRS}
|
2008-04-07 19:16:41 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(SMB_PLUGIN
|
2012-10-01 14:39:05 +04:00
|
|
|
ocsync_smb
|
2008-04-07 19:16:41 +04:00
|
|
|
)
|
|
|
|
|
2008-08-06 20:16:54 +04:00
|
|
|
set(SFTP_PLUGIN
|
2012-10-01 14:39:05 +04:00
|
|
|
ocsync_sftp
|
2008-08-06 20:16:54 +04:00
|
|
|
)
|
|
|
|
|
2012-02-14 18:33:13 +04:00
|
|
|
set(OWNCLOUD_PLUGIN
|
2012-10-01 14:39:05 +04:00
|
|
|
ocsync_owncloud
|
2011-09-11 12:16:30 +04:00
|
|
|
)
|
|
|
|
|
2008-04-07 19:16:41 +04:00
|
|
|
include_directories(
|
|
|
|
${MODULES_PUBLIC_INCLUDE_DIRS}
|
|
|
|
${MODULES_PRIVATE_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2012-01-25 02:44:52 +04:00
|
|
|
if(LIBSMBCLIENT_FOUND)
|
|
|
|
include_directories(${LIBSMBCLIENT_INCLUDE_DIRS})
|
2008-04-07 19:16:41 +04:00
|
|
|
macro_add_plugin(${SMB_PLUGIN} csync_smb.c)
|
2012-02-22 17:05:00 +04:00
|
|
|
target_link_libraries(${SMB_PLUGIN} ${CSYNC_LIBRARY} ${LIBSMBCLIENT_LIBRARIES})
|
2008-04-07 19:16:41 +04:00
|
|
|
|
2008-09-04 18:08:50 +04:00
|
|
|
install(
|
|
|
|
TARGETS
|
|
|
|
${SMB_PLUGIN}
|
|
|
|
DESTINATION
|
2008-12-16 17:03:57 +03:00
|
|
|
${PLUGIN_VERSION_INSTALL_DIR}
|
2008-09-04 18:08:50 +04:00
|
|
|
)
|
2012-01-25 02:44:52 +04:00
|
|
|
endif()
|
2008-09-04 18:08:50 +04:00
|
|
|
|
2012-10-01 14:39:05 +04:00
|
|
|
macro_add_plugin(ocsync_dummy csync_dummy.c)
|
|
|
|
target_link_libraries(ocsync_dummy ${CSYNC_LIBRARY})
|
2008-05-09 12:56:38 +04:00
|
|
|
|
2008-09-04 18:08:50 +04:00
|
|
|
if (LIBSSH_FOUND)
|
2008-08-06 20:16:54 +04:00
|
|
|
macro_add_plugin(${SFTP_PLUGIN} csync_sftp.c)
|
2012-02-22 17:05:00 +04:00
|
|
|
target_link_libraries(${SFTP_PLUGIN} ${CSYNC_LIBRARY} ${LIBSSH_LIBRARIES})
|
2008-08-06 20:16:54 +04:00
|
|
|
|
2008-09-04 18:08:50 +04:00
|
|
|
install(
|
2008-04-07 19:16:41 +04:00
|
|
|
TARGETS
|
2008-08-06 20:16:54 +04:00
|
|
|
${SFTP_PLUGIN}
|
2008-04-07 19:16:41 +04:00
|
|
|
DESTINATION
|
2008-12-16 17:03:57 +03:00
|
|
|
${PLUGIN_VERSION_INSTALL_DIR}
|
2008-04-07 19:16:41 +04:00
|
|
|
)
|
2008-09-04 18:08:50 +04:00
|
|
|
endif (LIBSSH_FOUND)
|
|
|
|
|
2011-09-11 12:16:30 +04:00
|
|
|
if (NEON_FOUND)
|
2012-04-27 18:27:44 +04:00
|
|
|
include_directories( ${NEON_INCLUDE_DIRS} )
|
2013-05-08 15:59:07 +04:00
|
|
|
macro_add_plugin(${OWNCLOUD_PLUGIN} csync_owncloud.c csync_owncloud_recursive_propfind.c csync_owncloud_util.c)
|
2013-01-29 17:58:54 +04:00
|
|
|
target_link_libraries(${OWNCLOUD_PLUGIN} ${CSYNC_LIBRARY} ${NEON_LIBRARIES} ${HTTPBF_LIBRARY})
|
2011-09-11 12:16:30 +04:00
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS
|
2012-02-14 18:33:13 +04:00
|
|
|
${OWNCLOUD_PLUGIN}
|
2011-09-11 12:16:30 +04:00
|
|
|
DESTINATION
|
|
|
|
${PLUGIN_VERSION_INSTALL_DIR}
|
|
|
|
)
|
|
|
|
endif (NEON_FOUND)
|
2008-04-07 19:16:41 +04:00
|
|
|
|
2008-08-06 20:16:54 +04:00
|
|
|
# create test file as bad plugin for the vio testcase
|
|
|
|
file(WRITE
|
2012-10-01 14:39:05 +04:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ocsync_bad.so
|
2008-08-06 20:16:54 +04:00
|
|
|
"bad plugin"
|
|
|
|
)
|
2008-09-04 18:08:50 +04:00
|
|
|
|