annotate Resources/CMake/OrthancFrameworkConfiguration.cmake @ 2860:8b00e4cb4a6b

SetOfCommandsJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Oct 2018 16:07:34 +0200
parents f790999a250a
children e62e296a5714
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 ## This is a CMake configuration file that configures the core
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 ## libraries of Orthanc. This file can be used by external projects so
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 ## as to gain access to the Orthanc APIs (the most prominent examples
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 ## are currently "Stone of Orthanc" and "Orthanc for whole-slide
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 ## imaging plugin").
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 ## Configuration of the components
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # Path to the root folder of the Orthanc distribution
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 set(ORTHANC_ROOT ${CMAKE_CURRENT_LIST_DIR}/../..)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # Some basic inclusions
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
18 include(CMakePushCheckState)
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 include(CheckFunctionExists)
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
20 include(CheckIncludeFile)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
21 include(CheckIncludeFileCXX)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
22 include(CheckIncludeFiles)
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 include(CheckLibraryExists)
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
24 include(CheckStructHasMember)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
25 include(CheckSymbolExists)
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
26 include(CheckTypeSize)
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 include(FindPythonInterp)
2450
ade8b4ddd8a6 Static linking against libuuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2444
diff changeset
28
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 include(${CMAKE_CURRENT_LIST_DIR}/AutoGeneratedCode.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 include(${CMAKE_CURRENT_LIST_DIR}/DownloadPackage.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 include(${CMAKE_CURRENT_LIST_DIR}/Compiler.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #####################################################################
2429
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
35 ## Disable unneeded macros
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
36 #####################################################################
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
37
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
38 if (NOT ENABLE_SQLITE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
39 unset(USE_SYSTEM_SQLITE CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
40 add_definitions(-DORTHANC_ENABLE_SQLITE=0)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
41 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
42
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
43 if (NOT ENABLE_CRYPTO_OPTIONS)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
44 unset(ENABLE_SSL CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
45 unset(ENABLE_PKCS11 CACHE)
2676
d2f70c8f8bfd primitives to compile OpenSSL within MariaDB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2657
diff changeset
46 unset(ENABLE_OPENSSL_ENGINES CACHE)
2429
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
47 unset(USE_SYSTEM_OPENSSL CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
48 unset(USE_SYSTEM_LIBP11 CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
49 add_definitions(
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
50 -DORTHANC_ENABLE_SSL=0
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
51 -DORTHANC_ENABLE_PKCS11=0
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
52 )
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
53 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
54
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
55 if (NOT ENABLE_WEB_CLIENT)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
56 unset(USE_SYSTEM_CURL CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
57 add_definitions(-DORTHANC_ENABLE_CURL=0)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
58 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
59
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
60 if (NOT ENABLE_WEB_SERVER)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
61 unset(ENABLE_CIVETWEB CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
62 unset(USE_SYSTEM_CIVETWEB CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
63 unset(USE_SYSTEM_MONGOOSE CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
64 add_definitions(
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
65 -DORTHANC_ENABLE_CIVETWEB=0
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
66 -DORTHANC_ENABLE_MONGOOSE=0
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
67 )
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
68 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
69
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
70 if (NOT ENABLE_JPEG)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
71 unset(USE_SYSTEM_LIBJPEG CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
72 add_definitions(-DORTHANC_ENABLE_JPEG=0)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
73 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
74
2508
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
75 if (NOT ENABLE_ZLIB)
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
76 unset(USE_SYSTEM_ZLIB CACHE)
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
77 add_definitions(-DORTHANC_ENABLE_ZLIB=0)
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
78 endif()
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
79
2429
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
80 if (NOT ENABLE_PNG)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
81 unset(USE_SYSTEM_LIBPNG CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
82 add_definitions(-DORTHANC_ENABLE_PNG=0)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
83 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
84
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
85 if (NOT ENABLE_LUA)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
86 unset(USE_SYSTEM_LUA CACHE)
2685
6801f99bbc2f Configuration option "LogExportedResources" is now "false" by default
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2676
diff changeset
87 unset(ENABLE_LUA_MODULES CACHE)
2429
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
88 add_definitions(-DORTHANC_ENABLE_LUA=0)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
89 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
90
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
91 if (NOT ENABLE_PUGIXML)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
92 unset(USE_SYSTEM_PUGIXML CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
93 add_definitions(-DORTHANC_ENABLE_PUGIXML=0)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
94 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
95
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
96 if (NOT ENABLE_LOCALE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
97 unset(USE_SYSTEM_LIBICONV CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
98 add_definitions(-DORTHANC_ENABLE_LOCALE=0)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
99 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
100
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
101 if (NOT ENABLE_GOOGLE_TEST)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
102 unset(USE_SYSTEM_GOOGLE_TEST CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
103 unset(USE_GOOGLE_TEST_DEBIAN_PACKAGE CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
104 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
105
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
106 if (NOT ENABLE_DCMTK)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
107 add_definitions(
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
108 -DORTHANC_ENABLE_DCMTK=0
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
109 -DORTHANC_ENABLE_DCMTK_NETWORKING=0
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
110 )
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
111 unset(DCMTK_DICTIONARY_DIR CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
112 unset(USE_DCMTK_360 CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
113 unset(USE_DCMTK_362_PRIVATE_DIC CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
114 unset(USE_SYSTEM_DCMTK CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
115 unset(ENABLE_DCMTK_JPEG CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
116 unset(ENABLE_DCMTK_JPEG_LOSSLESS CACHE)
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
117 endif()
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
118
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
119
fe90b3ec9d4a improvement in Orthanc framework config
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2407
diff changeset
120 #####################################################################
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 ## List of source files
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 set(ORTHANC_CORE_SOURCES_INTERNAL
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 ${ORTHANC_ROOT}/Core/Cache/MemoryCache.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 ${ORTHANC_ROOT}/Core/DicomFormat/DicomTag.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 ${ORTHANC_ROOT}/Core/Enumerations.cpp
2651
1da5a052c777 testing value serialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2621
diff changeset
129 ${ORTHANC_ROOT}/Core/FileStorage/MemoryStorageArea.cpp
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 ${ORTHANC_ROOT}/Core/Logging.cpp
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2651
diff changeset
131 ${ORTHANC_ROOT}/Core/SerializationToolbox.cpp
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 ${ORTHANC_ROOT}/Core/Toolbox.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 ${ORTHANC_ROOT}/Core/WebServiceParameters.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
2791
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
136 if (ENABLE_MODULE_IMAGES)
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
137 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
138 ${ORTHANC_ROOT}/Core/Images/Font.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
139 ${ORTHANC_ROOT}/Core/Images/FontRegistry.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
140 ${ORTHANC_ROOT}/Core/Images/IImageWriter.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
141 ${ORTHANC_ROOT}/Core/Images/Image.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
142 ${ORTHANC_ROOT}/Core/Images/ImageAccessor.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
143 ${ORTHANC_ROOT}/Core/Images/ImageBuffer.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
144 ${ORTHANC_ROOT}/Core/Images/ImageProcessing.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
145 ${ORTHANC_ROOT}/Core/Images/PamReader.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
146 ${ORTHANC_ROOT}/Core/Images/PamWriter.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
147 )
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
148 endif()
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
149
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
150 if (ENABLE_MODULE_DICOM)
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
151 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
152 ${ORTHANC_ROOT}/Core/DicomFormat/DicomArray.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
153 ${ORTHANC_ROOT}/Core/DicomFormat/DicomImageInformation.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
154 ${ORTHANC_ROOT}/Core/DicomFormat/DicomInstanceHasher.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
155 ${ORTHANC_ROOT}/Core/DicomFormat/DicomIntegerPixelAccessor.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
156 ${ORTHANC_ROOT}/Core/DicomFormat/DicomMap.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
157 ${ORTHANC_ROOT}/Core/DicomFormat/DicomValue.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
158 )
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
159 endif()
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
160
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
161 if (ENABLE_MODULE_JOBS)
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
162 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
163 ${ORTHANC_ROOT}/Core/JobsEngine/GenericJobUnserializer.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
164 ${ORTHANC_ROOT}/Core/JobsEngine/JobInfo.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
165 ${ORTHANC_ROOT}/Core/JobsEngine/JobStatus.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
166 ${ORTHANC_ROOT}/Core/JobsEngine/JobStepResult.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
167 ${ORTHANC_ROOT}/Core/JobsEngine/Operations/JobOperationValues.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
168 ${ORTHANC_ROOT}/Core/JobsEngine/Operations/LogJobOperation.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
169 ${ORTHANC_ROOT}/Core/JobsEngine/Operations/SequenceOfOperationsJob.cpp
2860
8b00e4cb4a6b SetOfCommandsJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2794
diff changeset
170 ${ORTHANC_ROOT}/Core/JobsEngine/SetOfCommandsJob.cpp
2791
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
171 ${ORTHANC_ROOT}/Core/JobsEngine/SetOfInstancesJob.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
172 )
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
173 endif()
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
174
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
175
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 ## Configuration of optional third-party dependencies
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 ## Embedded database: SQLite
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 if (ENABLE_SQLITE)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 include(${CMAKE_CURRENT_LIST_DIR}/SQLiteConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 add_definitions(-DORTHANC_ENABLE_SQLITE=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 ${ORTHANC_ROOT}/Core/SQLite/Connection.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 ${ORTHANC_ROOT}/Core/SQLite/FunctionContext.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 ${ORTHANC_ROOT}/Core/SQLite/Statement.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 ${ORTHANC_ROOT}/Core/SQLite/StatementId.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 ${ORTHANC_ROOT}/Core/SQLite/StatementReference.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 ${ORTHANC_ROOT}/Core/SQLite/Transaction.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 ## Cryptography: OpenSSL and libp11
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 ## Must be above "ENABLE_WEB_CLIENT" and "ENABLE_WEB_SERVER"
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 if (ENABLE_CRYPTO_OPTIONS)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 if (ENABLE_SSL)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 include(${CMAKE_CURRENT_LIST_DIR}/OpenSslConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 add_definitions(-DORTHANC_ENABLE_SSL=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 else()
2676
d2f70c8f8bfd primitives to compile OpenSSL within MariaDB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2657
diff changeset
211 unset(ENABLE_OPENSSL_ENGINES CACHE)
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 unset(USE_SYSTEM_OPENSSL CACHE)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 add_definitions(-DORTHANC_ENABLE_SSL=0)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 if (ENABLE_PKCS11)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 if (ENABLE_SSL)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 include(${CMAKE_CURRENT_LIST_DIR}/LibP11Configuration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 add_definitions(-DORTHANC_ENABLE_PKCS11=1)
2392
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
221 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 ${ORTHANC_ROOT}/Core/Pkcs11.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 message(FATAL_ERROR "OpenSSL is required to enable PKCS#11 support")
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 add_definitions(-DORTHANC_ENABLE_PKCS11=0)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 ## HTTP client: libcurl
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 if (ENABLE_WEB_CLIENT)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 include(${CMAKE_CURRENT_LIST_DIR}/LibCurlConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 add_definitions(-DORTHANC_ENABLE_CURL=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 ${ORTHANC_ROOT}/Core/HttpClient.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 ## HTTP server: Mongoose 3.8 or Civetweb
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 if (ENABLE_WEB_SERVER)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 if (ENABLE_CIVETWEB)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 include(${CMAKE_CURRENT_LIST_DIR}/CivetwebConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 add_definitions(
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 -DORTHANC_ENABLE_CIVETWEB=1
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 -DORTHANC_ENABLE_MONGOOSE=0
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 include(${CMAKE_CURRENT_LIST_DIR}/MongooseConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 add_definitions(
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 -DORTHANC_ENABLE_CIVETWEB=0
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 -DORTHANC_ENABLE_MONGOOSE=1
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267 ${ORTHANC_ROOT}/Core/HttpServer/BufferHttpSender.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268 ${ORTHANC_ROOT}/Core/HttpServer/FilesystemHttpHandler.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269 ${ORTHANC_ROOT}/Core/HttpServer/FilesystemHttpSender.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 ${ORTHANC_ROOT}/Core/HttpServer/HttpContentNegociation.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271 ${ORTHANC_ROOT}/Core/HttpServer/HttpFileSender.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
272 ${ORTHANC_ROOT}/Core/HttpServer/HttpOutput.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
273 ${ORTHANC_ROOT}/Core/HttpServer/HttpStreamTranscoder.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274 ${ORTHANC_ROOT}/Core/HttpServer/HttpToolbox.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 ${ORTHANC_ROOT}/Core/HttpServer/MongooseServer.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 ${ORTHANC_ROOT}/Core/HttpServer/StringHttpOutput.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 ${ORTHANC_ROOT}/Core/RestApi/RestApi.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 ${ORTHANC_ROOT}/Core/RestApi/RestApiCall.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 ${ORTHANC_ROOT}/Core/RestApi/RestApiGetCall.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 ${ORTHANC_ROOT}/Core/RestApi/RestApiHierarchy.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281 ${ORTHANC_ROOT}/Core/RestApi/RestApiOutput.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282 ${ORTHANC_ROOT}/Core/RestApi/RestApiPath.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
283 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288 ## JPEG support: libjpeg
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
289 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 if (ENABLE_JPEG)
2791
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
292 if (NOT ENABLE_MODULE_IMAGES)
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
293 message(FATAL_ERROR "Image processing primitives must be enabled if enabling libjpeg support")
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
294 endif()
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
295
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 include(${CMAKE_CURRENT_LIST_DIR}/LibJpegConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297 add_definitions(-DORTHANC_ENABLE_JPEG=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300 ${ORTHANC_ROOT}/Core/Images/JpegErrorManager.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 ${ORTHANC_ROOT}/Core/Images/JpegReader.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302 ${ORTHANC_ROOT}/Core/Images/JpegWriter.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
303 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 ##
2508
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
308 ## zlib support
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
309 ##
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
310
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
311 if (ENABLE_ZLIB)
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
312 include(${CMAKE_CURRENT_LIST_DIR}/ZlibConfiguration.cmake)
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
313 add_definitions(-DORTHANC_ENABLE_ZLIB=1)
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
314
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
315 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
316 ${ORTHANC_ROOT}/Core/Compression/DeflateBaseCompressor.cpp
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
317 ${ORTHANC_ROOT}/Core/Compression/GzipCompressor.cpp
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
318 ${ORTHANC_ROOT}/Core/Compression/ZlibCompressor.cpp
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
319 )
2529
ae5f98eadb75 fix in Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2516
diff changeset
320
ae5f98eadb75 fix in Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2516
diff changeset
321 if (NOT ORTHANC_SANDBOXED)
ae5f98eadb75 fix in Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2516
diff changeset
322 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
2782
64e3d4ab158d find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2708
diff changeset
323 ${ORTHANC_ROOT}/Core/Compression/HierarchicalZipWriter.cpp
64e3d4ab158d find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2708
diff changeset
324 ${ORTHANC_ROOT}/Core/Compression/ZipWriter.cpp
2529
ae5f98eadb75 fix in Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2516
diff changeset
325 ${ORTHANC_ROOT}/Core/FileStorage/StorageAccessor.cpp
2782
64e3d4ab158d find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2708
diff changeset
326 )
2529
ae5f98eadb75 fix in Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2516
diff changeset
327 endif()
2508
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
328 endif()
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
329
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
330
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
331 ##
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
332 ## PNG support: libpng (in conjunction with zlib)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
333 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
334
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
335 if (ENABLE_PNG)
2508
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
336 if (NOT ENABLE_ZLIB)
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
337 message(FATAL_ERROR "Support for zlib must be enabled if enabling libpng support")
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
338 endif()
91ee08d986f9 possibility to disable zlib support in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2483
diff changeset
339
2791
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
340 if (NOT ENABLE_MODULE_IMAGES)
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
341 message(FATAL_ERROR "Image processing primitives must be enabled if enabling libpng support")
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
342 endif()
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
343
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
344 include(${CMAKE_CURRENT_LIST_DIR}/LibPngConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
345 add_definitions(-DORTHANC_ENABLE_PNG=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
346
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
347 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
348 ${ORTHANC_ROOT}/Core/Images/PngReader.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
349 ${ORTHANC_ROOT}/Core/Images/PngWriter.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
350 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
355 ## Lua support
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
356 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
357
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
358 if (ENABLE_LUA)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
359 include(${CMAKE_CURRENT_LIST_DIR}/LuaConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
360 add_definitions(-DORTHANC_ENABLE_LUA=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
361
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
362 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
363 ${ORTHANC_ROOT}/Core/Lua/LuaContext.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
364 ${ORTHANC_ROOT}/Core/Lua/LuaFunctionCall.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
366 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
367
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
368
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
369 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
370 ## XML support: pugixml
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
371 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
372
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
373 if (ENABLE_PUGIXML)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
374 include(${CMAKE_CURRENT_LIST_DIR}/PugixmlConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
375 add_definitions(-DORTHANC_ENABLE_PUGIXML=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
376 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
377
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
378
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
379 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
380 ## Locale support: libiconv
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
381 ##
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
382
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
383 if (ENABLE_LOCALE)
2513
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
384 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
385 # In WebAssembly or asm.js, we rely on the version of iconv that
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
386 # is shipped with the stdlib
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
387 unset(USE_BOOST_ICONV CACHE)
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
388 else()
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
389 include(${CMAKE_CURRENT_LIST_DIR}/LibIconvConfiguration.cmake)
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
390 endif()
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
391
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
392 add_definitions(-DORTHANC_ENABLE_LOCALE=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
393 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
394
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
395
2404
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
396 ##
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
397 ## Google Test for unit testing
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
398 ##
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
399
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
400 if (ENABLE_GOOGLE_TEST)
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
401 include(${CMAKE_CURRENT_LIST_DIR}/GoogleTestConfiguration.cmake)
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
402 endif()
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
403
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
404
e6af2c5cd0f1 migration of Google Test into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2397
diff changeset
405
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
406 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
407 ## Inclusion of mandatory third-party dependencies
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
408 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
409
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
410 include(${CMAKE_CURRENT_LIST_DIR}/JsonCppConfiguration.cmake)
2512
4dcafa8d6633 SystemToolbox::GenerateUuid moved to Toolbox::GenerateUuid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2511
diff changeset
411 include(${CMAKE_CURRENT_LIST_DIR}/UuidConfiguration.cmake)
2465
80c1ed8e7283 uuid not available if sandboxed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2463
diff changeset
412
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
413 # We put Boost as the last dependency, as it is the heaviest to
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
414 # configure, which allows to quickly spot problems when configuring
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
415 # static builds in other dependencies
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
416 include(${CMAKE_CURRENT_LIST_DIR}/BoostConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
417
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
418
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
419 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
420 ## Optional configuration of DCMTK
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
421 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
422
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
423 if (ENABLE_DCMTK)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
424 if (NOT ENABLE_LOCALE)
2791
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
425 message(FATAL_ERROR "Support for locales must be enabled if enabling DCMTK support")
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
426 endif()
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
427
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
428 if (NOT ENABLE_MODULE_DICOM)
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
429 message(FATAL_ERROR "DICOM module must be enabled if enabling DCMTK support")
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
430 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
431
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
432 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfiguration.cmake)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
433
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
434 add_definitions(-DORTHANC_ENABLE_DCMTK=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
435
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
436 if (ENABLE_DCMTK_JPEG)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
437 add_definitions(-DORTHANC_ENABLE_DCMTK_JPEG=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
438 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
439 add_definitions(-DORTHANC_ENABLE_DCMTK_JPEG=0)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
440 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
441
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
442 if (ENABLE_DCMTK_JPEG_LOSSLESS)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
443 add_definitions(-DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
444 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
445 add_definitions(-DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=0)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
446 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
447
2391
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
448 set(ORTHANC_DICOM_SOURCES_INTERNAL
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
449 ${ORTHANC_ROOT}/Core/DicomParsing/DicomModification.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
450 ${ORTHANC_ROOT}/Core/DicomParsing/FromDcmtkBridge.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
451 ${ORTHANC_ROOT}/Core/DicomParsing/ParsedDicomFile.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
452 ${ORTHANC_ROOT}/Core/DicomParsing/ToDcmtkBridge.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
453
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
454 ${ORTHANC_ROOT}/Core/DicomParsing/Internals/DicomFrameIndex.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
455 ${ORTHANC_ROOT}/Core/DicomParsing/Internals/DicomImageDecoder.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
456 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
457
2516
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2514
diff changeset
458 if (NOT ORTHANC_SANDBOXED)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2514
diff changeset
459 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2514
diff changeset
460 ${ORTHANC_ROOT}/Core/DicomParsing/DicomDirWriter.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2514
diff changeset
461 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2514
diff changeset
462 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2514
diff changeset
463
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
464 if (ENABLE_DCMTK_NETWORKING)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
465 add_definitions(-DORTHANC_ENABLE_DCMTK_NETWORKING=1)
2391
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
466 list(APPEND ORTHANC_DICOM_SOURCES_INTERNAL
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
467 ${ORTHANC_ROOT}/Core/DicomNetworking/DicomFindAnswers.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
468 ${ORTHANC_ROOT}/Core/DicomNetworking/DicomServer.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
469 ${ORTHANC_ROOT}/Core/DicomNetworking/DicomUserConnection.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
470 ${ORTHANC_ROOT}/Core/DicomNetworking/Internals/CommandDispatcher.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
471 ${ORTHANC_ROOT}/Core/DicomNetworking/Internals/FindScp.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
472 ${ORTHANC_ROOT}/Core/DicomNetworking/Internals/MoveScp.cpp
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
473 ${ORTHANC_ROOT}/Core/DicomNetworking/Internals/StoreScp.cpp
2610
3ff4c50647ea moving the old scheduler to the graveyard
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
474 ${ORTHANC_ROOT}/Core/DicomNetworking/RemoteModalityParameters.cpp
3ff4c50647ea moving the old scheduler to the graveyard
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
475 ${ORTHANC_ROOT}/Core/DicomNetworking/TimeoutDicomConnectionManager.cpp
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
476 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
477 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
478 add_definitions(-DORTHANC_ENABLE_DCMTK_NETWORKING=0)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
479 endif()
2397
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
480
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
481 if (STANDALONE_BUILD AND NOT HAS_EMBEDDED_RESOURCES)
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
482 EmbedResources(
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
483 ${DCMTK_DICTIONARIES}
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
484 )
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
485 list(APPEND ORTHANC_DICOM_SOURCES_DEPENDENCIES
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
486 ${AUTOGENERATED_SOURCES}
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
487 )
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
488 endif()
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
489 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
490
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
491
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
492 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
493 ## Configuration of the C/C++ macros
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
494 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
495
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
496 add_definitions(
2444
d9e3781d2023 "/system" URI returns the version of the Orthanc REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2429
diff changeset
497 -DORTHANC_API_VERSION="${ORTHANC_API_VERSION}"
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
498 -DORTHANC_DATABASE_VERSION=${ORTHANC_DATABASE_VERSION}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
499 -DORTHANC_DEFAULT_DICOM_ENCODING=Encoding_Latin1
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
500 -DORTHANC_ENABLE_BASE64=1
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
501 -DORTHANC_ENABLE_MD5=1
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
502 -DORTHANC_MAXIMUM_TAG_LENGTH=256
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
503 -DORTHANC_VERSION="${ORTHANC_VERSION}"
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
504 )
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
505
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
506
2406
f0cfacd0c9b8 Orthanc framework: ORTHANC_SANDBOXED parameter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2404
diff changeset
507 if (ORTHANC_SANDBOXED)
2407
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
508 add_definitions(
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
509 -DORTHANC_SANDBOXED=1
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
510 -DORTHANC_ENABLE_LOGGING_PLUGIN=0
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
511 )
2483
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
512
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
513 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
514 add_definitions(
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
515 -DORTHANC_ENABLE_LOGGING=1
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
516 -DORTHANC_ENABLE_LOGGING_STDIO=1
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
517 )
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
518 else()
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
519 add_definitions(
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
520 -DORTHANC_ENABLE_LOGGING=0
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
521 )
9c54c40eaf25 logging primitives for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2465
diff changeset
522 endif()
2407
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
523
2406
f0cfacd0c9b8 Orthanc framework: ORTHANC_SANDBOXED parameter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2404
diff changeset
524 else()
2407
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
525 add_definitions(
2541
4ff979cf676e fix missing logging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2540
diff changeset
526 -DORTHANC_ENABLE_LOGGING=1
4ff979cf676e fix missing logging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2540
diff changeset
527 -DORTHANC_ENABLE_LOGGING_STDIO=0
2407
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
528 -DORTHANC_SANDBOXED=0
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
529 )
2536
e0e377a48626 ORTHANC_FRAMEWORK_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2529
diff changeset
530
2407
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
531 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
532 ${ORTHANC_ROOT}/Core/Cache/SharedArchive.cpp
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
533 ${ORTHANC_ROOT}/Core/FileStorage/FilesystemStorage.cpp
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
534 ${ORTHANC_ROOT}/Core/MultiThreading/RunnableWorkersPool.cpp
2794
f790999a250a Semaphore removed from graveyard, SystemToolbox::GetHardwareConcurrency()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2791
diff changeset
535 ${ORTHANC_ROOT}/Core/MultiThreading/Semaphore.cpp
2407
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
536 ${ORTHANC_ROOT}/Core/MultiThreading/SharedMessageQueue.cpp
2463
be5c0f4155f6 move SharedLibrary into OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2453
diff changeset
537 ${ORTHANC_ROOT}/Core/SharedLibrary.cpp
2407
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
538 ${ORTHANC_ROOT}/Core/SystemToolbox.cpp
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
539 ${ORTHANC_ROOT}/Core/TemporaryFile.cpp
5edec967055e fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2406
diff changeset
540 )
2791
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
541
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
542 if (ENABLE_MODULE_JOBS)
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
543 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
544 ${ORTHANC_ROOT}/Core/JobsEngine/JobsEngine.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
545 ${ORTHANC_ROOT}/Core/JobsEngine/JobsRegistry.cpp
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
546 )
d015fa861e3c selective disabling of modules in the Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2785
diff changeset
547 endif()
2406
f0cfacd0c9b8 Orthanc framework: ORTHANC_SANDBOXED parameter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2404
diff changeset
548 endif()
f0cfacd0c9b8 Orthanc framework: ORTHANC_SANDBOXED parameter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2404
diff changeset
549
f0cfacd0c9b8 Orthanc framework: ORTHANC_SANDBOXED parameter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2404
diff changeset
550
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
551 if (HAS_EMBEDDED_RESOURCES)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
552 add_definitions(-DORTHANC_HAS_EMBEDDED_RESOURCES=1)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
553
2686
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2685
diff changeset
554 if (ENABLE_WEB_SERVER)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2685
diff changeset
555 list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2685
diff changeset
556 ${ORTHANC_ROOT}/Core/HttpServer/EmbeddedResourceHttpHandler.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2685
diff changeset
557 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2685
diff changeset
558 endif()
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
559 else()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
560 add_definitions(-DORTHANC_HAS_EMBEDDED_RESOURCES=0)
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
561 endif()
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
562
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
563
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
564 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
565 ## Gathering of all the source code
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
566 #####################################################################
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
567
2392
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
568 # The "xxx_INTERNAL" variables list the source code that belongs to
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
569 # the Orthanc project. It can be used to configure precompiled headers
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
570 # if using Microsoft Visual Studio.
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
571
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
572 # The "xxx_DEPENDENCIES" variables list the source code coming from
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
573 # third-party dependencies.
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
574
a88c3ea0c96d getting rid of the OpenSSL static library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2391
diff changeset
575
2390
cf0eb76c5e81 fix precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2388
diff changeset
576 set(ORTHANC_CORE_SOURCES_DEPENDENCIES
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
577 ${BOOST_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
578 ${CIVETWEB_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
579 ${CURL_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
580 ${JSONCPP_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
581 ${LIBICONV_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
582 ${LIBJPEG_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
583 ${LIBP11_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
584 ${LIBPNG_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
585 ${LUA_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
586 ${MONGOOSE_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
587 ${OPENSSL_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
588 ${PUGIXML_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
589 ${SQLITE_SOURCES}
2453
c50413a4092c missing generated file in e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2450
diff changeset
590 ${UUID_SOURCES}
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
591 ${ZLIB_SOURCES}
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
592
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
593 ${ORTHANC_ROOT}/Resources/ThirdParty/md5/md5.c
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
594 ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp
2785
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
595 )
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
596
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
597 if (ENABLE_ZLIB AND NOT ORTHANC_SANDBOXED)
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
598 list(APPEND ORTHANC_CORE_SOURCES_DEPENDENCIES
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
599 # This is the minizip distribution to create ZIP files using zlib
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
600 ${ORTHANC_ROOT}/Resources/ThirdParty/minizip/ioapi.c
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
601 ${ORTHANC_ROOT}/Resources/ThirdParty/minizip/zip.c
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
602 )
a16ad34d46f1 fix msvc build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2784
diff changeset
603 endif()
2390
cf0eb76c5e81 fix precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2388
diff changeset
604
2514
38d666a40860 fix msvc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2513
diff changeset
605
2390
cf0eb76c5e81 fix precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2388
diff changeset
606 set(ORTHANC_CORE_SOURCES
cf0eb76c5e81 fix precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2388
diff changeset
607 ${ORTHANC_CORE_SOURCES_INTERNAL}
cf0eb76c5e81 fix precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2388
diff changeset
608 ${ORTHANC_CORE_SOURCES_DEPENDENCIES}
2388
50cde8246542 CMake to build the Orthanc framework without the Orthanc server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
609 )
2391
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
610
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
611 if (ENABLE_DCMTK)
2397
98c2a9c2c0fc automated inclusion of DICOM dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2396
diff changeset
612 list(APPEND ORTHANC_DICOM_SOURCES_DEPENDENCIES
2391
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
613 ${DCMTK_SOURCES}
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
614 )
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
615
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
616 set(ORTHANC_DICOM_SOURCES
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
617 ${ORTHANC_DICOM_SOURCES_INTERNAL}
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
618 ${ORTHANC_DICOM_SOURCES_DEPENDENCIES}
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
619 )
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2390
diff changeset
620 endif()