diff CMakeLists.txt @ 2367:2aff870c2c58

refactoring of BoostConfiguration.cmake
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Aug 2017 17:32:13 +0200
parents 26f3a346226f
children 32bea64e070b
line wrap: on
line diff
--- a/CMakeLists.txt	Mon Aug 21 21:21:48 2017 +0200
+++ b/CMakeLists.txt	Tue Aug 22 17:32:13 2017 +0200
@@ -69,8 +69,11 @@
 
 # Path to the root folder of the Orthanc distribution
 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR})
-set(ENABLE_DCMTK_NETWORK ON)
-set(USE_BOOST_LOCALE_BACKEND OFF)
+
+# These options must be set to "ON" if compiling Orthanc, but might be
+# set to "OFF" in some plugins if their support is not required
+set(ENABLE_DCMTK_NETWORK ON)  # Enable support for DICOM networking in DCMTK
+set(ENABLE_LOCALE ON)         # Enable support for locales (notably in Boost)
 
 # Some basic inclusions
 include(CheckIncludeFiles)
@@ -306,6 +309,7 @@
 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibIconvConfiguration.cmake)
+include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake)
 
 # These are the two most heavyweight dependencies. We put them as the
 # last includes to quickly spot problems when configuring static
@@ -316,7 +320,6 @@
 
 if (ENABLE_SSL)
   add_definitions(-DORTHANC_ENABLE_SSL=1)
-  include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake)
 else()
   add_definitions(-DORTHANC_ENABLE_SSL=0)
 endif()
@@ -343,6 +346,13 @@
 endif()
 
 
+if (ENABLE_LOCALE)
+  add_definitions(-DORTHANC_ENABLE_LOCALE=1)
+else()
+  add_definitions(-DORTHANC_ENABLE_LOCALE=0)
+endif()
+
+
 if (ENABLE_PKCS11)
   if (ENABLE_SSL)
     include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibP11Configuration.cmake)