2008-02-27 20:56:47 +03:00
|
|
|
|
2008-05-06 12:51:12 +04:00
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
# global needed variables
|
2014-01-15 15:20:03 +04:00
|
|
|
set(APPLICATION_NAME "ocsync")
|
2008-12-16 17:03:57 +03:00
|
|
|
|
2015-04-16 21:56:00 +03:00
|
|
|
set(LIBRARY_VERSION ${MIRALL_VERSION})
|
2008-12-16 17:03:57 +03:00
|
|
|
set(LIBRARY_SOVERSION "0")
|
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
# add definitions
|
|
|
|
include(DefineCMakeDefaults)
|
2011-10-17 21:07:52 +04:00
|
|
|
include(DefinePlatformDefaults)
|
2008-02-27 20:56:47 +03:00
|
|
|
include(DefineCompilerFlags)
|
|
|
|
include(DefineOptions.cmake)
|
|
|
|
|
2012-02-21 20:43:30 +04:00
|
|
|
include(DefineInstallationPaths)
|
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
# add macros
|
|
|
|
include(MacroAddPlugin)
|
2008-03-03 15:43:12 +03:00
|
|
|
include(MacroCopyFile)
|
2008-02-27 20:56:47 +03:00
|
|
|
|
2013-07-22 18:39:46 +04:00
|
|
|
if (NOT WIN32)
|
|
|
|
find_package(Iconv)
|
|
|
|
endif (NOT WIN32)
|
2014-06-02 19:36:42 +04:00
|
|
|
|
2015-02-04 15:03:28 +03:00
|
|
|
find_package(SQLite3 3.8.0 REQUIRED)
|
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
include(ConfigureChecks.cmake)
|
2013-01-09 18:04:17 +04:00
|
|
|
|
2012-07-11 18:50:25 +04:00
|
|
|
|
|
|
|
set(SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
2015-02-04 15:15:06 +03:00
|
|
|
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
2012-07-11 18:50:25 +04:00
|
|
|
|
2012-02-20 21:21:22 +04:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
2008-02-27 20:56:47 +03:00
|
|
|
|
2008-03-03 15:43:12 +03:00
|
|
|
macro_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake)
|
|
|
|
|
2008-07-28 13:49:56 +04:00
|
|
|
if (MEM_NULL_TESTS)
|
|
|
|
add_definitions(-DCSYNC_MEM_NULL_TESTS)
|
|
|
|
endif (MEM_NULL_TESTS)
|
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
add_subdirectory(src)
|
2008-03-03 14:27:52 +03:00
|
|
|
|
2014-06-05 16:22:10 +04:00
|
|
|
if (UNIT_TESTING)
|
|
|
|
find_package(CMocka)
|
|
|
|
if (CMOCKA_FOUND)
|
|
|
|
include(AddCMockaTest)
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif (CMOCKA_FOUND)
|
|
|
|
endif (UNIT_TESTING)
|
|
|
|
|
2014-01-15 15:20:03 +04:00
|
|
|
configure_file(config_csync.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_csync.h)
|
2013-01-09 18:04:17 +04:00
|
|
|
configure_file(config_test.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_test.h)
|
|
|
|
|
|
|
|
|