comparison 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
comparison
equal deleted inserted replaced
2366:26f3a346226f 2367:2aff870c2c58
67 mark_as_advanced(USE_BOOST_ICONV) 67 mark_as_advanced(USE_BOOST_ICONV)
68 mark_as_advanced(USE_PUGIXML) 68 mark_as_advanced(USE_PUGIXML)
69 69
70 # Path to the root folder of the Orthanc distribution 70 # Path to the root folder of the Orthanc distribution
71 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}) 71 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR})
72 set(ENABLE_DCMTK_NETWORK ON) 72
73 set(USE_BOOST_LOCALE_BACKEND OFF) 73 # These options must be set to "ON" if compiling Orthanc, but might be
74 # set to "OFF" in some plugins if their support is not required
75 set(ENABLE_DCMTK_NETWORK ON) # Enable support for DICOM networking in DCMTK
76 set(ENABLE_LOCALE ON) # Enable support for locales (notably in Boost)
74 77
75 # Some basic inclusions 78 # Some basic inclusions
76 include(CheckIncludeFiles) 79 include(CheckIncludeFiles)
77 include(CheckIncludeFileCXX) 80 include(CheckIncludeFileCXX)
78 include(CheckFunctionExists) 81 include(CheckFunctionExists)
304 include(${CMAKE_SOURCE_DIR}/Resources/CMake/PugixmlConfiguration.cmake) 307 include(${CMAKE_SOURCE_DIR}/Resources/CMake/PugixmlConfiguration.cmake)
305 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake) 308 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
306 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) 309 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
307 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) 310 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
308 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibIconvConfiguration.cmake) 311 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibIconvConfiguration.cmake)
312 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake)
309 313
310 # These are the two most heavyweight dependencies. We put them as the 314 # These are the two most heavyweight dependencies. We put them as the
311 # last includes to quickly spot problems when configuring static 315 # last includes to quickly spot problems when configuring static
312 # builds. 316 # builds.
313 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) 317 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
314 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake) 318 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
315 319
316 320
317 if (ENABLE_SSL) 321 if (ENABLE_SSL)
318 add_definitions(-DORTHANC_ENABLE_SSL=1) 322 add_definitions(-DORTHANC_ENABLE_SSL=1)
319 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake)
320 else() 323 else()
321 add_definitions(-DORTHANC_ENABLE_SSL=0) 324 add_definitions(-DORTHANC_ENABLE_SSL=0)
322 endif() 325 endif()
323 326
324 327
338 341
339 if (ENABLE_PLUGINS) 342 if (ENABLE_PLUGINS)
340 add_definitions(-DORTHANC_ENABLE_PLUGINS=1) 343 add_definitions(-DORTHANC_ENABLE_PLUGINS=1)
341 else() 344 else()
342 add_definitions(-DORTHANC_ENABLE_PLUGINS=0) 345 add_definitions(-DORTHANC_ENABLE_PLUGINS=0)
346 endif()
347
348
349 if (ENABLE_LOCALE)
350 add_definitions(-DORTHANC_ENABLE_LOCALE=1)
351 else()
352 add_definitions(-DORTHANC_ENABLE_LOCALE=0)
343 endif() 353 endif()
344 354
345 355
346 if (ENABLE_PKCS11) 356 if (ENABLE_PKCS11)
347 if (ENABLE_SSL) 357 if (ENABLE_SSL)