diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-08-16 09:36:52 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-09-05 18:25:19 +0300 |
commit | cf15cbf0b3fb2c25148d3a9f21d1a47405a43e94 (patch) | |
tree | d7ff0fa3adf5bacda4169f7be24c8a1a5ead3b28 /CMakeLists.txt | |
parent | de7c3016540b2612293cda98586f53be9a21b4ae (diff) |
Move Utility to a new common static library
Now that csync builds as C++, this will avoid having to implement
functionalities needed by csync mandatorily in csync itself.
This library is built as part of libocsync and symbols exported
through it.
This requires a relicense of Utility as LGPL. All classes moved into
this library from src/libsync will need to be relicensed as well.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 976f19aec..4b1d4f203 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,13 @@ endif() include(Warnings) include(${CMAKE_SOURCE_DIR}/VERSION.cmake) +# For config.h include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +# Allows includes based on src/ like #include "common/utility.h" or #include "csync/csync.h" +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_BINARY_DIR}/src +) # disable the crashreporter if libcrashreporter-qt is not available or we're building for ARM if( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/3rdparty/libcrashreporter-qt/CMakeLists.txt") @@ -211,13 +217,8 @@ endif() file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/client_*.ts) set(TRANSLATIONS ${TRANS_FILES}) -if(UNIT_TESTING) - # Make sure we set this before recursing into child folders. - set(WITH_TESTING ON) - include(CTest) - enable_testing() - add_subdirectory(test) -endif(UNIT_TESTING) +# Make sure we set this before recursing into child folders. +set(WITH_TESTING ${UNIT_TESTING}) add_subdirectory(src) if(NOT BUILD_LIBRARIES_ONLY) @@ -227,7 +228,14 @@ add_subdirectory(doc/dev) add_subdirectory(admin) endif(NOT BUILD_LIBRARIES_ONLY) +if(UNIT_TESTING) + include(CTest) + enable_testing() + add_subdirectory(test) +endif(UNIT_TESTING) + configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) if(BUILD_OWNCLOUD_OSX_BUNDLE) install(FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/) |