2008-02-27 20:56:47 +03:00
|
|
|
project(libcsync)
|
|
|
|
|
|
|
|
add_subdirectory(std)
|
|
|
|
|
2008-05-20 23:55:57 +04:00
|
|
|
find_package(SQLite3 REQUIRED)
|
2008-05-01 12:01:34 +04:00
|
|
|
find_package(Iniparser REQUIRED)
|
2008-05-06 12:54:15 +04:00
|
|
|
find_package(Dlfcn REQUIRED)
|
2008-05-15 21:18:41 +04:00
|
|
|
find_package(RT REQUIRED)
|
2008-02-27 20:56:47 +03:00
|
|
|
|
|
|
|
set(CSYNC_PUBLIC_INCLUDE_DIRS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}
|
|
|
|
CACHE INTERNAL "csync public include directories"
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CSYNC_PRIVATE_INCLUDE_DIRS
|
2008-05-06 12:54:15 +04:00
|
|
|
${DLFCN_INCLUDE_DIRS}
|
2008-05-15 21:18:41 +04:00
|
|
|
${RT_INCLUDE_DIRS}
|
2008-02-27 20:56:47 +03:00
|
|
|
${INIPARSER_INCLUDE_DIRS}
|
2008-05-06 12:54:15 +04:00
|
|
|
${LOG4C_INCLUDE_DIRS}
|
|
|
|
${SQLITE3_INCLUDE_DIRS}
|
2008-02-27 20:56:47 +03:00
|
|
|
${CSTDLIB_PUBLIC_INCLUDE_DIRS}
|
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CSYNC_LIBRARY
|
|
|
|
csync
|
|
|
|
CACHE INTERNAL "csync library"
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CSYNC_LINK_LIBRARIES
|
|
|
|
${CSYNC_LIBRARY}
|
|
|
|
${CSTDLIB_LIBRARY}
|
2008-05-06 12:54:15 +04:00
|
|
|
${DLFCN_LIBRARIES}
|
2008-05-15 21:18:41 +04:00
|
|
|
${RT_LIBRARIES}
|
2008-02-27 20:56:47 +03:00
|
|
|
${INIPARSER_LIBRARIES}
|
|
|
|
${LOG4C_LIBRARIES}
|
|
|
|
${SQLITE3_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(csync_SRCS
|
|
|
|
csync.c
|
2008-03-06 19:43:58 +03:00
|
|
|
csync_config.c
|
2008-03-25 18:13:44 +03:00
|
|
|
csync_exclude.c
|
2008-02-27 20:56:47 +03:00
|
|
|
csync_journal.c
|
|
|
|
csync_lock.c
|
2008-05-05 12:35:38 +04:00
|
|
|
csync_time.c
|
2008-02-27 20:56:47 +03:00
|
|
|
csync_util.c
|
2008-05-16 19:30:57 +04:00
|
|
|
|
2008-04-23 14:12:48 +04:00
|
|
|
csync_update.c
|
2008-05-16 19:30:57 +04:00
|
|
|
csync_reconcile.c
|
|
|
|
csync_propagate.c
|
2008-04-07 19:16:41 +04:00
|
|
|
|
|
|
|
vio/csync_vio.c
|
|
|
|
vio/csync_vio_handle.c
|
2008-04-10 17:44:41 +04:00
|
|
|
vio/csync_vio_file_stat.c
|
2008-04-21 16:55:59 +04:00
|
|
|
vio/csync_vio_local.c
|
2008-02-27 20:56:47 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(csync_HDRS
|
|
|
|
csync.h
|
2008-05-13 15:36:50 +04:00
|
|
|
vio/csync_vio.h
|
|
|
|
vio/csync_vio_file_stat.h
|
|
|
|
vio/csync_vio_handle.h
|
|
|
|
vio/csync_vio_method.h
|
|
|
|
vio/csync_vio_module.h
|
2008-02-27 20:56:47 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CSYNC_PUBLIC_INCLUDE_DIRS}
|
|
|
|
${CSYNC_PRIVATE_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(${CSYNC_LIBRARY} SHARED ${csync_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(${CSYNC_LINK_LIBRARIES})
|
|
|
|
|
|
|
|
set_target_properties(
|
|
|
|
${CSYNC_LIBRARY}
|
|
|
|
PROPERTIES
|
|
|
|
VERSION
|
|
|
|
0.1.0
|
|
|
|
SOVERSION
|
|
|
|
0
|
|
|
|
)
|
|
|
|
|
|
|
|
INSTALL(
|
|
|
|
TARGETS
|
|
|
|
${CSYNC_LIBRARY}
|
|
|
|
DESTINATION
|
|
|
|
${LIB_INSTALL_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
INSTALL(
|
|
|
|
FILES
|
|
|
|
${csync_HDRS}
|
|
|
|
DESTINATION
|
|
|
|
${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
|
|
|
|
)
|
|
|
|
|