Mercurial > hg > orthanc
changeset 2037:661c75c7ff8f
reorganization in the cmake
author | sjodogne |
---|---|
date | Tue, 21 Jun 2016 13:52:22 +0200 |
parents | 99e70e9b05ad |
children | 235319b3ddf0 |
files | CMakeLists.txt |
diffstat | 1 files changed, 17 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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