2008-02-27 20:56:47 +03:00
|
|
|
project(libcsync)
|
|
|
|
|
|
|
|
add_subdirectory(std)
|
|
|
|
|
|
|
|
find_package(Sqlite3 REQUIRED)
|
2008-05-01 12:01:34 +04:00
|
|
|
find_package(Iniparser 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
|
|
|
|
${SQLITE3_INCLUDE_DIRS}
|
|
|
|
${INIPARSER_INCLUDE_DIRS}
|
|
|
|
${CSTDLIB_PUBLIC_INCLUDE_DIRS}
|
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CSYNC_LIBRARY
|
|
|
|
csync
|
|
|
|
CACHE INTERNAL "csync library"
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CSYNC_LINK_LIBRARIES
|
|
|
|
${CSYNC_LIBRARY}
|
|
|
|
${CSTDLIB_LIBRARY}
|
|
|
|
${INIPARSER_LIBRARIES}
|
|
|
|
${LOG4C_LIBRARIES}
|
|
|
|
${SQLITE3_LIBRARIES}
|
|
|
|
dl
|
|
|
|
)
|
|
|
|
|
|
|
|
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-04-23 14:12:48 +04:00
|
|
|
csync_update.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
|
|
|
|
)
|
|
|
|
|
|
|
|
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}
|
|
|
|
)
|
|
|
|
|