Mercurial > hg > orthanc-wsi
comparison Applications/CMakeLists.txt @ 194:e57e6ca5303d
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Jun 2020 18:03:23 +0200 |
parents | f299c191cd76 |
children | fda17c92d784 |
comparison
equal
deleted
inserted
replaced
193:e690c265b315 | 194:e57e6ca5303d |
---|---|
14 SET(ENABLE_PROFILING OFF CACHE BOOL "Whether to enable the generation of profiling information with gprof") | 14 SET(ENABLE_PROFILING OFF CACHE BOOL "Whether to enable the generation of profiling information with gprof") |
15 | 15 |
16 # Advanced parameters to fine-tune linking against system libraries | 16 # Advanced parameters to fine-tune linking against system libraries |
17 SET(USE_SYSTEM_LIBTIFF ON CACHE BOOL "Use the system version of libtiff") | 17 SET(USE_SYSTEM_LIBTIFF ON CACHE BOOL "Use the system version of libtiff") |
18 SET(USE_SYSTEM_OPENJPEG ON CACHE BOOL "Use the system version of OpenJpeg") | 18 SET(USE_SYSTEM_OPENJPEG ON CACHE BOOL "Use the system version of OpenJpeg") |
19 SET(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") | |
20 | 19 |
21 | 20 |
22 | 21 |
23 ##################################################################### | 22 ##################################################################### |
24 ## Configure mandatory third-party components | 23 ## Configure mandatory third-party components |
30 include(${CMAKE_SOURCE_DIR}/../Resources/Orthanc/DownloadOrthancFramework.cmake) | 29 include(${CMAKE_SOURCE_DIR}/../Resources/Orthanc/DownloadOrthancFramework.cmake) |
31 | 30 |
32 UNSET(STANDALONE_BUILD CACHE) | 31 UNSET(STANDALONE_BUILD CACHE) |
33 SET(STANDALONE_BUILD ON) # Embed DCMTK's dictionaries for static builds | 32 SET(STANDALONE_BUILD ON) # Embed DCMTK's dictionaries for static builds |
34 | 33 |
35 include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) | 34 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) |
36 | 35 |
37 SET(ENABLE_CRYPTO_OPTIONS ON) | 36 SET(ENABLE_CRYPTO_OPTIONS ON) |
38 SET(ENABLE_DCMTK ON) | 37 SET(ENABLE_DCMTK ON) |
39 SET(ENABLE_DCMTK_JPEG OFF) # Disable DCMTK's support for JPEG, that clashes with libtiff | 38 SET(ENABLE_DCMTK_JPEG OFF) # Disable DCMTK's support for JPEG, that clashes with libtiff |
40 SET(ENABLE_DCMTK_JPEG_LOSSLESS OFF) # Disable DCMTK's support for JPEG-LS | 39 SET(ENABLE_DCMTK_JPEG_LOSSLESS OFF) # Disable DCMTK's support for JPEG-LS |
46 SET(ENABLE_SSL ON) | 45 SET(ENABLE_SSL ON) |
47 SET(ENABLE_WEB_CLIENT ON) | 46 SET(ENABLE_WEB_CLIENT ON) |
48 SET(ENABLE_ZLIB ON) | 47 SET(ENABLE_ZLIB ON) |
49 SET(HAS_EMBEDDED_RESOURCES ON) | 48 SET(HAS_EMBEDDED_RESOURCES ON) |
50 | 49 |
51 include(${ORTHANC_ROOT}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake) | 50 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake) |
52 include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) | 51 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) |
53 include_directories( | 52 include_directories( |
54 ${ORTHANC_ROOT}/Core/ | 53 ${ORTHANC_FRAMEWORK_ROOT}/Sources/ |
55 ${ORTHANC_ROOT}/Plugins/Samples/Common/ | |
56 ) | 54 ) |
57 | 55 |
58 | 56 |
59 # Include components specific to WSI | 57 # Include components specific to WSI |
60 include(${ORTHANC_WSI_DIR}/Resources/CMake/BoostExtendedConfiguration.cmake) | 58 include(${ORTHANC_WSI_DIR}/Resources/CMake/BoostExtendedConfiguration.cmake) |
61 include(${ORTHANC_WSI_DIR}/Resources/CMake/OpenJpegConfiguration.cmake) | 59 include(${ORTHANC_WSI_DIR}/Resources/CMake/OpenJpegConfiguration.cmake) |
62 include(${ORTHANC_WSI_DIR}/Resources/CMake/LibTiffConfiguration.cmake) | 60 include(${ORTHANC_WSI_DIR}/Resources/CMake/LibTiffConfiguration.cmake) |
63 | 61 |
64 | |
65 | |
66 ##################################################################### | |
67 ## Find the Orthanc SDK | |
68 ##################################################################### | |
69 | |
70 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) | |
71 include_directories(${CMAKE_SOURCE_DIR}/../Resources/Orthanc/Sdk-1.0.0) | |
72 else () | |
73 CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCPlugin.h HAVE_ORTHANC_H) | |
74 if (NOT HAVE_ORTHANC_H) | |
75 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK") | |
76 endif() | |
77 endif() | |
78 | 62 |
79 | 63 |
80 ##################################################################### | 64 ##################################################################### |
81 ## Create the list of the source files that depend upon the | 65 ## Create the list of the source files that depend upon the |
82 ## precompiled headers | 66 ## precompiled headers |
138 ${ORTHANC_CORE_SOURCES_INTERNAL} | 122 ${ORTHANC_CORE_SOURCES_INTERNAL} |
139 ${ORTHANC_DICOM_SOURCES_INTERNAL} | 123 ${ORTHANC_DICOM_SOURCES_INTERNAL} |
140 ) | 124 ) |
141 | 125 |
142 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | 126 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( |
143 "PrecompiledHeaders.h" "${ORTHANC_ROOT}/Core/PrecompiledHeaders.cpp" | 127 "PrecompiledHeaders.h" "${ORTHANC_FRAMEWORK_ROOT}/Sources/PrecompiledHeaders.cpp" |
144 TMP ORTHANC_CORE_PCH) | 128 TMP ORTHANC_CORE_PCH) |
145 | 129 |
146 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( | 130 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( |
147 "PrecompiledHeadersWSI.h" "${ORTHANC_WSI_DIR}/Framework/PrecompiledHeadersWSI.cpp" | 131 "PrecompiledHeadersWSI.h" "${ORTHANC_WSI_DIR}/Framework/PrecompiledHeadersWSI.cpp" |
148 ORTHANC_WSI_SOURCES ORTHANC_WSI_PCH) | 132 ORTHANC_WSI_SOURCES ORTHANC_WSI_PCH) |
165 ${ORTHANC_DICOM_SOURCES_INTERNAL} | 149 ${ORTHANC_DICOM_SOURCES_INTERNAL} |
166 ${ORTHANC_DICOM_SOURCES_DEPENDENCIES} | 150 ${ORTHANC_DICOM_SOURCES_DEPENDENCIES} |
167 ${AUTOGENERATED_SOURCES} | 151 ${AUTOGENERATED_SOURCES} |
168 ${BOOST_EXTENDED_SOURCES} | 152 ${BOOST_EXTENDED_SOURCES} |
169 | 153 |
170 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | 154 ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/DicomDatasetReader.cpp |
171 ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomDatasetReader.cpp | 155 ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/DicomPath.cpp |
172 ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomPath.cpp | 156 ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/DicomTag.cpp |
173 ${ORTHANC_ROOT}/Plugins/Samples/Common/DicomTag.cpp | 157 ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/FullOrthancDataset.cpp |
174 ${ORTHANC_ROOT}/Plugins/Samples/Common/FullOrthancDataset.cpp | 158 ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/IOrthancConnection.cpp |
175 ${ORTHANC_ROOT}/Plugins/Samples/Common/IOrthancConnection.cpp | 159 ${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/OrthancHttpConnection.cpp |
176 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancHttpConnection.cpp | 160 #${ORTHANC_WSI_DIR}/Framework/Inputs/Orthanc/OrthancPluginConnection.cpp # For plugins only |
177 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginConnection.cpp | 161 #${ORTHANC_WSI_DIR}/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp # For plugins only |
178 ${ORTHANC_ROOT}/Plugins/Samples/Common/SimplifiedOrthancDataset.cpp | |
179 | 162 |
180 # Mandatory components | 163 # Mandatory components |
181 ${LIBTIFF_SOURCES} | 164 ${LIBTIFF_SOURCES} |
182 ${OPENJPEG_SOURCES} | 165 ${OPENJPEG_SOURCES} |
183 ) | 166 ) |
189 | 172 |
190 # Create the Windows resources, if need be | 173 # Create the Windows resources, if need be |
191 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 174 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
192 execute_process( | 175 execute_process( |
193 COMMAND | 176 COMMAND |
194 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | 177 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py |
195 ${ORTHANC_WSI_VERSION} OrthancWSIDicomizer OrthancWSIDicomizer.exe "Companion tool to Orthanc for whole-slide imaging" | 178 ${ORTHANC_WSI_VERSION} OrthancWSIDicomizer OrthancWSIDicomizer.exe "Companion tool to Orthanc for whole-slide imaging" |
196 ERROR_VARIABLE Failure | 179 ERROR_VARIABLE Failure |
197 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomizer.rc | 180 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomizer.rc |
198 ) | 181 ) |
199 | 182 |
225 | 208 |
226 # Create the Windows resources, if need be | 209 # Create the Windows resources, if need be |
227 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 210 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
228 execute_process( | 211 execute_process( |
229 COMMAND | 212 COMMAND |
230 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | 213 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py |
231 ${ORTHANC_WSI_VERSION} OrthancWSIDicomToTiff OrthancWSIDicomToTiff.exe "Companion tool to Orthanc for whole-slide imaging" | 214 ${ORTHANC_WSI_VERSION} OrthancWSIDicomToTiff OrthancWSIDicomToTiff.exe "Companion tool to Orthanc for whole-slide imaging" |
232 ERROR_VARIABLE Failure | 215 ERROR_VARIABLE Failure |
233 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomToTiff.rc | 216 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancWSIDicomToTiff.rc |
234 ) | 217 ) |
235 | 218 |