blob: 11c1e1a5da87d67873da2a30d2d1992fdd9497a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
add_definitions(-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY)
# global needed variables
set(APPLICATION_NAME "ocsync")
set(LIBRARY_VERSION ${MIRALL_VERSION})
set(LIBRARY_SOVERSION "0")
# add definitions
option(MEM_NULL_TESTS "Enable NULL memory testing" OFF)
include(ConfigureChecks.cmake)
include(../common/common.cmake)
if (MEM_NULL_TESTS)
add_definitions(-DCSYNC_MEM_NULL_TESTS)
endif (MEM_NULL_TESTS)
set(csync_SRCS
csync.cpp
csync_exclude.cpp
std/c_time.cpp
)
if (WIN32)
list(APPEND csync_SRCS
vio/csync_vio_local_win.cpp
)
else()
list(APPEND csync_SRCS
vio/csync_vio_local_unix.cpp
)
endif()
configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h)
add_library(csync SHARED ${common_SOURCES} ${csync_SRCS})
target_include_directories(
csync
PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std
)
generate_export_header(csync
EXPORT_MACRO_NAME OCSYNC_EXPORT
EXPORT_FILE_NAME ocsynclib.h
)
target_link_libraries(csync
${CSYNC_REQUIRED_LIBRARIES}
SQLite::SQLite3
Qt5::Core Qt5::Concurrent
)
if(ZLIB_FOUND)
target_link_libraries(csync ZLIB::ZLIB)
endif(ZLIB_FOUND)
# For src/common/utility_mac.cpp
if (APPLE)
find_library(FOUNDATION_LIBRARY NAMES Foundation)
find_library(CORESERVICES_LIBRARY NAMES CoreServices)
target_link_libraries(csync ${FOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})
endif()
set_target_properties(
csync
PROPERTIES
OUTPUT_NAME
"${APPLICATION_EXECUTABLE}_csync"
VERSION
${LIBRARY_VERSION}
SOVERSION
${LIBRARY_SOVERSION}
)
INSTALL(TARGETS csync ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
configure_file(config_csync.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_csync.h)
|