Mercurial > hg > orthanc
comparison Resources/CMake/DcmtkConfiguration.cmake @ 2338:86a99fd1bbfb
switch to just-released dcmtk 3.6.2
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 17 Jul 2017 18:49:45 +0200 |
parents | 46a312152744 |
children | 6e26d363dc53 |
comparison
equal
deleted
inserted
replaced
2337:ad6b669ca08c | 2338:86a99fd1bbfb |
---|---|
1 if (NOT DEFINED ENABLE_DCMTK_NETWORKING) | 1 if (NOT DEFINED ENABLE_DCMTK_NETWORKING) |
2 set(ENABLE_DCMTK_NETWORKING ON) | 2 set(ENABLE_DCMTK_NETWORKING ON) |
3 endif() | 3 endif() |
4 | 4 |
5 if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) | 5 if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) |
6 if (USE_DCMTK_361) | 6 if (USE_DCMTK_360) |
7 SET(DCMTK_VERSION_NUMBER 361) | |
8 SET(DCMTK_PACKAGE_VERSION "3.6.1") | |
9 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.1_20170228) | |
10 SET(DCMTK_URL "http://www.orthanc-server.com/downloads/third-party/dcmtk-3.6.1_20170228.tar.gz") | |
11 SET(DCMTK_MD5 "65f3520fce5d084c3530ae7252e39f3e") | |
12 SET(DCMTK_PATCH_SPEED "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.1-speed.patch") | |
13 | |
14 macro(DCMTK_UNSET) | |
15 endmacro() | |
16 | |
17 set(DCMTK_BINARY_DIR ${DCMTK_SOURCES_DIR}/) | |
18 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) | |
19 add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1) | |
20 else() | |
21 SET(DCMTK_VERSION_NUMBER 360) | 7 SET(DCMTK_VERSION_NUMBER 360) |
22 SET(DCMTK_PACKAGE_VERSION "3.6.0") | 8 SET(DCMTK_PACKAGE_VERSION "3.6.0") |
23 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.0) | 9 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.0) |
24 SET(DCMTK_URL "http://www.orthanc-server.com/downloads/third-party/dcmtk-3.6.0.zip") | 10 SET(DCMTK_URL "http://www.orthanc-server.com/downloads/third-party/dcmtk-3.6.0.zip") |
25 SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4") | 11 SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4") |
26 SET(DCMTK_PATCH_SPEED "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-speed.patch") | 12 SET(DCMTK_PATCH_SPEED "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-speed.patch") |
27 SET(DCMTK_PATCH_MINGW64 "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-mingw64.patch") | 13 SET(DCMTK_PATCH_MINGW64 "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-mingw64.patch") |
14 else() | |
15 SET(DCMTK_VERSION_NUMBER 362) | |
16 SET(DCMTK_PACKAGE_VERSION "3.6.2") | |
17 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.2) | |
18 SET(DCMTK_URL "http://www.orthanc-server.com/downloads/third-party/dcmtk-3.6.2.tar.gz") | |
19 SET(DCMTK_MD5 "d219a4152772985191c9b89d75302d12") | |
20 SET(DCMTK_PATCH_SPEED "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.2-speed.patch") | |
21 | |
22 macro(DCMTK_UNSET) | |
23 endmacro() | |
24 | |
25 macro(DCMTK_UNSET_CACHE) | |
26 endmacro() | |
27 | |
28 set(DCMTK_BINARY_DIR ${DCMTK_SOURCES_DIR}/) | |
29 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) | |
30 add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1) | |
28 endif() | 31 endif() |
29 | 32 |
30 if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") | 33 if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") |
31 set(FirstRun OFF) | 34 set(FirstRun OFF) |
32 else() | 35 else() |
35 | 38 |
36 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}") | 39 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}") |
37 | 40 |
38 | 41 |
39 if (FirstRun AND | 42 if (FirstRun AND |
40 NOT USE_DCMTK_361) | 43 USE_DCMTK_360) |
41 if (USE_DCMTK_361_PRIVATE_DIC) | |
42 # If using DCMTK 3.6.0, backport the "private.dic" file from DCMTK | |
43 # 3.6.1 snapshot. This adds support for more private tags, and | |
44 # fixes some import problems with Philips MRI Achieva. | |
45 message("Using the dictionary of private tags from DCMTK 3.6.1") | |
46 configure_file( | |
47 ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.1-private.dic | |
48 ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic | |
49 COPYONLY) | |
50 else() | |
51 message("Using the dictionary of private tags from DCMTK 3.6.0") | |
52 endif() | |
53 | |
54 # Patches specific to DCMTK 3.6.0 | 44 # Patches specific to DCMTK 3.6.0 |
55 execute_process( | 45 execute_process( |
56 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-dulparse-vulnerability.patch | 46 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-dulparse-vulnerability.patch |
57 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | 47 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
58 RESULT_VARIABLE Failure | 48 RESULT_VARIABLE Failure |
89 | 79 |
90 CONFIGURE_FILE( | 80 CONFIGURE_FILE( |
91 ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in | 81 ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in |
92 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h) | 82 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h) |
93 | 83 |
94 if (USE_DCMTK_361) | 84 if (NOT USE_DCMTK_360) |
95 # This step must be after the generation of "osconfig.h" | 85 # This step must be after the generation of "osconfig.h" |
96 INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES() | 86 INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES() |
97 endif() | 87 endif() |
98 | 88 |
99 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES) | 89 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES) |
210 list(REMOVE_ITEM DCMTK_SOURCES | 200 list(REMOVE_ITEM DCMTK_SOURCES |
211 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc | 201 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc |
212 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc | 202 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc |
213 ) | 203 ) |
214 | 204 |
215 if (NOT USE_DCMTK_361) | 205 if (USE_DCMTK_360) |
216 # Removing this file is required with DCMTK 3.6.0 | 206 # Removing this file is required with DCMTK 3.6.0 |
217 list(REMOVE_ITEM DCMTK_SOURCES | 207 list(REMOVE_ITEM DCMTK_SOURCES |
218 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdictbi.cc | 208 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdictbi.cc |
219 ) | 209 ) |
220 endif() | 210 endif() |