Mercurial > hg > orthanc
annotate Resources/CMake/DcmtkConfiguration.cmake @ 4114:cfe805d75e4b Orthanc-1.5.8
closing Orthanc-1.5.8
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jul 2020 13:08:45 +0200 |
parents | 4b1017928fc4 |
children | e1904cfdca2c |
rev | line source |
---|---|
1914
501769757bf9
flag to remove network support in dcmtk, removal of unneeded sources in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1883
diff
changeset
|
1 if (NOT DEFINED ENABLE_DCMTK_NETWORKING) |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
2 set(ENABLE_DCMTK_NETWORKING ON) |
1914
501769757bf9
flag to remove network support in dcmtk, removal of unneeded sources in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1883
diff
changeset
|
3 endif() |
501769757bf9
flag to remove network support in dcmtk, removal of unneeded sources in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1883
diff
changeset
|
4 |
929 | 5 if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
6 if (DCMTK_STATIC_VERSION STREQUAL "3.6.0") |
3279
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
7 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.0.cmake) |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
8 elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.2") |
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
9 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.2.cmake) |
3279
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
10 elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.4") |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
11 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.4.cmake) |
2356
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
12 else() |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
13 message(FATAL_ERROR "Unsupported version of DCMTK: ${DCMTK_STATIC_VERSION}") |
2152
cbebc5d072b0
Use of DCMTK 3.6.1 dictionary of private tags in standalone builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2150
diff
changeset
|
14 endif() |
cbebc5d072b0
Use of DCMTK 3.6.1 dictionary of private tags in standalone builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2150
diff
changeset
|
15 |
2515
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
16 |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
17 ## |
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
18 ## Commands shared by all versions of DCMTK |
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
19 ## |
3279
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
20 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
21 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
22 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/ofstd/libsrc DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
23 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
24 LIST(REMOVE_ITEM DCMTK_SOURCES |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
25 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
26 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
27 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
28 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
29 if (ENABLE_DCMTK_NETWORKING) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
30 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmnet/libsrc DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
31 include_directories( |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
32 ${DCMTK_SOURCES_DIR}/dcmnet/include |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
33 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
34 endif() |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
35 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
36 if (ENABLE_DCMTK_JPEG) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
37 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
38 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libijg8 DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
39 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libijg12 DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
40 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libijg16 DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
41 include_directories( |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
42 ${DCMTK_SOURCES_DIR}/dcmjpeg/include |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
43 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg8 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
44 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg12 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
45 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg16 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
46 ${DCMTK_SOURCES_DIR}/dcmimgle/include |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
47 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
48 list(REMOVE_ITEM DCMTK_SOURCES |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
49 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/ddpiimpl.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
50 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
51 # Disable support for encoding JPEG (modification in Orthanc 1.0.1) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
52 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djcodece.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
53 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsv1.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
54 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencbas.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
55 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencpro.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
56 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djenclol.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
57 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencode.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
58 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencext.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
59 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsps.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
60 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
61 endif() |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
62 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
63 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
64 if (ENABLE_DCMTK_JPEG_LOSSLESS) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
65 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpls/libsrc DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
66 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpls/libcharls DCMTK_SOURCES) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
67 include_directories( |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
68 ${DCMTK_SOURCES_DIR}/dcmjpeg/include |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
69 ${DCMTK_SOURCES_DIR}/dcmjpls/include |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
70 ${DCMTK_SOURCES_DIR}/dcmjpls/libcharls |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
71 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
72 list(REMOVE_ITEM DCMTK_SOURCES |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
73 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djcodece.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
74 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
75 # Disable support for encoding JPEG-LS (modification in Orthanc 1.0.1) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
76 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djencode.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
77 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
78 list(APPEND DCMTK_SOURCES |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
79 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djrplol.cc |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
80 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
81 endif() |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
82 |
2344 | 83 |
929 | 84 # This fixes crashes related to the destruction of the DCMTK OFLogger |
85 # http://support.dcmtk.org/docs-snapshot/file_macros.html | |
86 add_definitions( | |
87 -DLOG4CPLUS_DISABLE_FATAL=1 | |
1634 | 88 -DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER} |
929 | 89 ) |
90 | |
3316
4b1017928fc4
Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3279
diff
changeset
|
91 |
2928
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
92 if (NOT ENABLE_DCMTK_LOG) |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
93 # Disable logging internal to DCMTK |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
94 # https://groups.google.com/d/msg/orthanc-users/v2SzzAmY948/VxT1QVGiBAAJ |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
95 add_definitions( |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
96 -DDCMTK_LOG4CPLUS_DISABLE_FATAL=1 |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
97 -DDCMTK_LOG4CPLUS_DISABLE_ERROR=1 |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
98 -DDCMTK_LOG4CPLUS_DISABLE_WARN=1 |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
99 -DDCMTK_LOG4CPLUS_DISABLE_INFO=1 |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
100 -DDCMTK_LOG4CPLUS_DISABLE_DEBUG=1 |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
101 ) |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
102 endif() |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
103 |
929 | 104 include_directories( |
105 #${DCMTK_SOURCES_DIR} | |
106 ${DCMTK_SOURCES_DIR}/config/include | |
107 ${DCMTK_SOURCES_DIR}/ofstd/include | |
108 ${DCMTK_SOURCES_DIR}/oflog/include | |
109 ${DCMTK_SOURCES_DIR}/dcmdata/include | |
110 ) | |
111 | |
112 source_group(ThirdParty\\Dcmtk REGULAR_EXPRESSION ${DCMTK_SOURCES_DIR}/.*) | |
113 | |
114 if (STANDALONE_BUILD) | |
1770 | 115 set(DCMTK_USE_EMBEDDED_DICTIONARIES 1) |
116 set(DCMTK_DICTIONARIES | |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
117 DICTIONARY_DICOM ${DCMTK_SOURCES_DIR}/dcmdata/data/dicom.dic |
1770 | 118 DICTIONARY_PRIVATE ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic |
119 DICTIONARY_DICONDE ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic | |
120 ) | |
929 | 121 else() |
1770 | 122 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) |
929 | 123 endif() |
124 | |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
125 |
929 | 126 else() |
127 # The following line allows to manually add libraries at the | |
128 # command-line, which is necessary for Ubuntu/Debian packages | |
129 set(tmp "${DCMTK_LIBRARIES}") | |
130 include(FindDCMTK) | |
131 list(APPEND DCMTK_LIBRARIES "${tmp}") | |
132 | |
1943
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
133 include_directories(${DCMTK_INCLUDE_DIRS}) |
929 | 134 |
135 add_definitions( | |
136 -DHAVE_CONFIG_H=1 | |
137 ) | |
138 | |
1943
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
139 if (EXISTS "${DCMTK_config_INCLUDE_DIR}/cfunix.h") |
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
140 set(DCMTK_CONFIGURATION_FILE "${DCMTK_config_INCLUDE_DIR}/cfunix.h") |
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
141 elseif (EXISTS "${DCMTK_config_INCLUDE_DIR}/osconfig.h") # This is for Arch Linux |
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
142 set(DCMTK_CONFIGURATION_FILE "${DCMTK_config_INCLUDE_DIR}/osconfig.h") |
2287
9f3414878c02
Fix Debian #865606 (orthanc FTBFS with libdcmtk-dev 3.6.1~20170228-2)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2193
diff
changeset
|
143 elseif (EXISTS "${DCMTK_INCLUDE_DIRS}/dcmtk/config/osconfig.h") # This is for Debian Buster |
9f3414878c02
Fix Debian #865606 (orthanc FTBFS with libdcmtk-dev 3.6.1~20170228-2)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2193
diff
changeset
|
144 set(DCMTK_CONFIGURATION_FILE "${DCMTK_INCLUDE_DIRS}/dcmtk/config/osconfig.h") |
929 | 145 else() |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
146 message(FATAL_ERROR "Please install libdcmtk*-dev") |
929 | 147 endif() |
148 | |
2287
9f3414878c02
Fix Debian #865606 (orthanc FTBFS with libdcmtk-dev 3.6.1~20170228-2)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2193
diff
changeset
|
149 message("DCMTK configuration file: ${DCMTK_CONFIGURATION_FILE}") |
9f3414878c02
Fix Debian #865606 (orthanc FTBFS with libdcmtk-dev 3.6.1~20170228-2)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2193
diff
changeset
|
150 |
929 | 151 # Autodetection of the version of DCMTK |
152 file(STRINGS | |
153 "${DCMTK_CONFIGURATION_FILE}" | |
154 DCMTK_VERSION_NUMBER1 REGEX | |
155 ".*PACKAGE_VERSION .*") | |
156 | |
157 string(REGEX REPLACE | |
158 ".*PACKAGE_VERSION.*\"([0-9]*)\\.([0-9]*)\\.([0-9]*)\"$" | |
159 "\\1\\2\\3" | |
160 DCMTK_VERSION_NUMBER | |
161 ${DCMTK_VERSION_NUMBER1}) | |
162 | |
1770 | 163 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) |
164 endif() | |
929 | 165 |
166 | |
167 add_definitions(-DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER}) | |
168 message("DCMTK version: ${DCMTK_VERSION_NUMBER}") | |
1770 | 169 |
170 | |
171 add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=${DCMTK_USE_EMBEDDED_DICTIONARIES}) | |
172 if (NOT DCMTK_USE_EMBEDDED_DICTIONARIES) | |
173 # Lookup for DICOM dictionaries, if none is specified by the user | |
174 if (DCMTK_DICTIONARY_DIR STREQUAL "") | |
175 find_path(DCMTK_DICTIONARY_DIR_AUTO dicom.dic | |
176 /usr/share/dcmtk | |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
177 /usr/share/libdcmtk1 |
1770 | 178 /usr/share/libdcmtk2 |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
179 /usr/share/libdcmtk3 |
1770 | 180 /usr/share/libdcmtk4 |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
181 /usr/share/libdcmtk5 |
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
182 /usr/share/libdcmtk6 |
2064
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
183 /usr/share/libdcmtk7 |
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
184 /usr/share/libdcmtk8 |
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
185 /usr/share/libdcmtk9 |
2288
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
186 /usr/share/libdcmtk10 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
187 /usr/share/libdcmtk11 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
188 /usr/share/libdcmtk12 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
189 /usr/share/libdcmtk13 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
190 /usr/share/libdcmtk14 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
191 /usr/share/libdcmtk15 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
192 /usr/share/libdcmtk16 |
2515
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
193 /usr/share/libdcmtk17 |
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
194 /usr/share/libdcmtk18 |
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
195 /usr/share/libdcmtk19 |
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
196 /usr/share/libdcmtk20 |
1770 | 197 /usr/local/share/dcmtk |
198 ) | |
199 | |
200 if (${DCMTK_DICTIONARY_DIR_AUTO} MATCHES "DCMTK_DICTIONARY_DIR_AUTO-NOTFOUND") | |
201 message(FATAL_ERROR "Cannot locate the DICOM dictionary on this system") | |
202 endif() | |
203 | |
204 message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}") | |
205 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}") | |
206 else() | |
207 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}") | |
208 endif() | |
209 endif() |