2009-03-18 12:55:14 +03:00
|
|
|
project(client C)
|
2008-02-27 20:56:47 +03:00
|
|
|
|
|
|
|
set(CLIENT_PUBLIC_INCLUDE_DIRS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}
|
|
|
|
CACHE INTERNAL "csync client public include directories"
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CLIENT_PRIVATE_INCLUDE_DIRS
|
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
${CSYNC_PUBLIC_INCLUDE_DIRS}
|
2012-02-22 15:08:54 +04:00
|
|
|
${CSTDLIB_PUBLIC_INCLUDE_DIRS}
|
2012-02-22 15:05:16 +04:00
|
|
|
${ARGP_INCLUDE_DIRS}
|
2008-02-27 20:56:47 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(CLIENT_EXECUTABLE
|
2012-10-01 14:39:05 +04:00
|
|
|
ocsync_client
|
|
|
|
CACHE INTERNAL "ocsync client"
|
2008-02-27 20:56:47 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(CLIENT_LINK_LIBRARIES
|
|
|
|
${CLIENT_EXECUTABLE}
|
|
|
|
${CSYNC_LIBRARY}
|
|
|
|
)
|
|
|
|
|
2012-02-22 15:05:16 +04:00
|
|
|
if(NOT LINUX)
|
|
|
|
list(APPEND CLIENT_LINK_LIBRARIES ${ARGP_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
set(client_SRCS
|
|
|
|
csync_client.c
|
2008-05-13 15:40:06 +04:00
|
|
|
csync_auth.c
|
2008-02-27 20:56:47 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CLIENT_PUBLIC_INCLUDE_DIRS}
|
|
|
|
${CLIENT_PRIVATE_INCLUDE_DIRS}
|
|
|
|
${CSYNC_PUBLIC_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(${CLIENT_EXECUTABLE} ${client_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(${CLIENT_LINK_LIBRARIES})
|
|
|
|
|
|
|
|
set_target_properties(
|
|
|
|
${CLIENT_EXECUTABLE}
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME
|
2012-10-01 14:39:05 +04:00
|
|
|
ocsync
|
2008-02-27 20:56:47 +03:00
|
|
|
)
|
|
|
|
|
2008-05-05 19:52:19 +04:00
|
|
|
install(
|
|
|
|
TARGETS
|
2012-10-01 14:39:05 +04:00
|
|
|
ocsync_client
|
|
|
|
|
2008-05-05 19:52:19 +04:00
|
|
|
DESTINATION
|
|
|
|
${BIN_INSTALL_DIR}
|
|
|
|
)
|