# HG changeset patch # User sjodogne # Date 1466509942 -7200 # Node ID 661c75c7ff8f5de3e421c6abac8d7c7a2fb40f34 # Parent 99e70e9b05ad3df1a134231343199d7d2107fe08 reorganization in the cmake diff -r 99e70e9b05ad -r 661c75c7ff8f CMakeLists.txt --- a/CMakeLists.txt Tue Jun 21 13:29:02 2016 +0200 +++ b/CMakeLists.txt Tue Jun 21 13:52:22 2016 +0200 @@ -389,7 +389,7 @@ ##################################################################### -## Build the core of Orthanc +## Configuration of the C/C++ macros ##################################################################### # Setup precompiled headers for Microsoft Visual Studio @@ -406,14 +406,30 @@ "PrecompiledHeadersUnitTests.h" "UnitTestsSources/PrecompiledHeadersUnitTests.cpp" ORTHANC_UNIT_TESTS_SOURCES) endif() +if (UNIT_TESTS_WITH_HTTP_CONNEXIONS) + add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1) +else() + add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0) +endif() add_definitions( -DORTHANC_VERSION="${ORTHANC_VERSION}" -DORTHANC_DATABASE_VERSION=${ORTHANC_DATABASE_VERSION} -DORTHANC_ENABLE_LOGGING=1 -DORTHANC_MAXIMUM_TAG_LENGTH=256 + -DORTHANC_BUILD_UNIT_TESTS=1 + + # Macros for the plugins + -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}" + -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}" ) + + +##################################################################### +## Build the core of Orthanc +##################################################################### + list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH) if (${OPENSSL_SOURCES_LENGTH} GREATER 0) add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) @@ -480,16 +496,6 @@ ## Build the unit tests ##################################################################### -if (UNIT_TESTS_WITH_HTTP_CONNEXIONS) - add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1) -else() - add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0) -endif() - -add_definitions( - -DORTHANC_BUILD_UNIT_TESTS=1 - ) - include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) add_executable(UnitTests ${GTEST_SOURCES} @@ -524,8 +530,6 @@ list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) endif() - add_definitions(-DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}") - include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) add_library(ServeFolders SHARED @@ -571,8 +575,6 @@ list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) endif() - add_definitions(-DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}") - include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) add_library(ModalityWorklists SHARED