Mercurial > hg > orthanc-webviewer
comparison CMakeLists.txt @ 231:7097d0eaac76 transcoding
Move the GDCM decoder out of the Orthanc Web viewer plugin as a separate plugin
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 11 May 2020 15:34:12 +0200 |
parents | cce89307af28 |
children | f18f6e7269b3 |
comparison
equal
deleted
inserted
replaced
230:cce89307af28 | 231:7097d0eaac76 |
---|---|
40 set(ORTHANC_FRAMEWORK_VERSION "${ORTHANC_FRAMEWORK_DEFAULT_VERSION}" CACHE STRING "Version of the Orthanc framework") | 40 set(ORTHANC_FRAMEWORK_VERSION "${ORTHANC_FRAMEWORK_DEFAULT_VERSION}" CACHE STRING "Version of the Orthanc framework") |
41 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"") | 41 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"") |
42 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"") | 42 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"") |
43 | 43 |
44 # Advanced parameters to fine-tune linking against system libraries | 44 # Advanced parameters to fine-tune linking against system libraries |
45 set(USE_SYSTEM_GDCM ON CACHE BOOL "Use the system version of Grassroot DICOM (GDCM)") | |
46 set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") | 45 set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") |
47 | 46 |
48 | 47 |
49 # Download and setup the Orthanc framework | 48 # Download and setup the Orthanc framework |
50 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/DownloadOrthancFramework.cmake) | 49 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/DownloadOrthancFramework.cmake) |
58 | 57 |
59 include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) | 58 include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) |
60 include_directories(${ORTHANC_ROOT}) | 59 include_directories(${ORTHANC_ROOT}) |
61 | 60 |
62 | 61 |
63 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GdcmConfiguration.cmake) | |
64 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JavaScriptLibraries.cmake) | 62 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JavaScriptLibraries.cmake) |
65 | 63 |
66 | 64 |
67 # Check that the Orthanc SDK headers are available | 65 # Check that the Orthanc SDK headers are available |
68 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) | 66 if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK) |
138 ${ORTHANC_CORE_SOURCES} | 136 ${ORTHANC_CORE_SOURCES} |
139 ) | 137 ) |
140 | 138 |
141 add_library(OrthancWebViewer | 139 add_library(OrthancWebViewer |
142 SHARED | 140 SHARED |
141 ${AUTOGENERATED_SOURCES} | |
142 ${CMAKE_SOURCE_DIR}/Plugin/DecodedImageAdapter.cpp | |
143 ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp | |
143 ${CORE_SOURCES} | 144 ${CORE_SOURCES} |
144 ${AUTOGENERATED_SOURCES} | |
145 ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp | |
146 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | 145 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
147 | |
148 # The following files depend on GDCM | |
149 ${CMAKE_SOURCE_DIR}/Plugin/DecodedImageAdapter.cpp | |
150 ${ORTHANC_ROOT}/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp | |
151 ${ORTHANC_ROOT}/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.cpp | |
152 ${ORTHANC_ROOT}/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp | |
153 ) | 146 ) |
154 | 147 |
155 | |
156 if (STATIC_BUILD OR NOT USE_SYSTEM_GDCM) | |
157 add_dependencies(OrthancWebViewer GDCM) | |
158 endif() | |
159 | |
160 target_link_libraries(OrthancWebViewer ${GDCM_LIBRARIES}) | |
161 | 148 |
162 message("Setting the version of the library to ${ORTHANC_PLUGIN_VERSION}") | 149 message("Setting the version of the library to ${ORTHANC_PLUGIN_VERSION}") |
163 | 150 |
164 add_definitions(-DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}") | 151 add_definitions(-DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}") |
165 | 152 |