Skip to content

Commit cf15cbf

Browse files
committedSep 5, 2017
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.
1 parent de7c301 commit cf15cbf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+298
-263
lines changed
 

‎CMakeLists.txt

+15-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ endif()
4141
include(Warnings)
4242

4343
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
44+
# For config.h
4445
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
46+
# Allows includes based on src/ like #include "common/utility.h" or #include "csync/csync.h"
47+
include_directories(
48+
${CMAKE_CURRENT_SOURCE_DIR}/src
49+
${CMAKE_CURRENT_BINARY_DIR}/src
50+
)
4551

4652
# disable the crashreporter if libcrashreporter-qt is not available or we're building for ARM
4753
if( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/3rdparty/libcrashreporter-qt/CMakeLists.txt")
@@ -211,13 +217,8 @@ endif()
211217
file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/client_*.ts)
212218
set(TRANSLATIONS ${TRANS_FILES})
213219

214-
if(UNIT_TESTING)
215-
# Make sure we set this before recursing into child folders.
216-
set(WITH_TESTING ON)
217-
include(CTest)
218-
enable_testing()
219-
add_subdirectory(test)
220-
endif(UNIT_TESTING)
220+
# Make sure we set this before recursing into child folders.
221+
set(WITH_TESTING ${UNIT_TESTING})
221222

222223
add_subdirectory(src)
223224
if(NOT BUILD_LIBRARIES_ONLY)
@@ -227,7 +228,14 @@ add_subdirectory(doc/dev)
227228
add_subdirectory(admin)
228229
endif(NOT BUILD_LIBRARIES_ONLY)
229230

231+
if(UNIT_TESTING)
232+
include(CTest)
233+
enable_testing()
234+
add_subdirectory(test)
235+
endif(UNIT_TESTING)
236+
230237
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
238+
configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
231239

232240
if(BUILD_OWNCLOUD_OSX_BUNDLE)
233241
install(FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)

‎src/cmd/simplesslerrorhandler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* for more details.
1313
*/
1414
#include "configfile.h"
15-
#include "utility.h"
15+
#include "common/utility.h"
1616
#include "account.h"
1717
#include "simplesslerrorhandler.h"
1818

0 commit comments

Comments
 (0)
Please sign in to comment.