Mercurial > hg > orthanc
annotate Resources/CMake/DcmtkConfiguration.cmake @ 2380:96b3ec054b69
reorganization in macros
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Aug 2017 16:49:44 +0200 |
parents | c33ff8a7ffa9 |
children | 741bb76634d3 |
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) |
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
|
2 set(ENABLE_DCMTK_NETWORKING ON) |
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) |
2338
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
6 if (USE_DCMTK_360) |
1951
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
7 SET(DCMTK_VERSION_NUMBER 360) |
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
8 SET(DCMTK_PACKAGE_VERSION "3.6.0") |
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
9 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.0) |
2186
8b51b133bb8b
move of third party downloads to the main server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2157
diff
changeset
|
10 SET(DCMTK_URL "http://www.orthanc-server.com/downloads/third-party/dcmtk-3.6.0.zip") |
1951
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
11 SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4") |
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
12 SET(DCMTK_PATCH_SPEED "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-speed.patch") |
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
13 SET(DCMTK_PATCH_MINGW64 "${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-mingw64.patch") |
2338
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
14 else() |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
15 SET(DCMTK_VERSION_NUMBER 362) |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
16 SET(DCMTK_PACKAGE_VERSION "3.6.2") |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
17 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.2) |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
18 SET(DCMTK_URL "http://www.orthanc-server.com/downloads/third-party/dcmtk-3.6.2.tar.gz") |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
19 SET(DCMTK_MD5 "d219a4152772985191c9b89d75302d12") |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
20 |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
21 macro(DCMTK_UNSET) |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
22 endmacro() |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
23 |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
24 macro(DCMTK_UNSET_CACHE) |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
25 endmacro() |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
26 |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
27 set(DCMTK_BINARY_DIR ${DCMTK_SOURCES_DIR}/) |
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
28 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) |
2376
c33ff8a7ffa9
Fix static compilation of DCMTK 3.6.2 on Fedora
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2364
diff
changeset
|
29 set(DCMTK_WITH_THREADS ON) |
c33ff8a7ffa9
Fix static compilation of DCMTK 3.6.2 on Fedora
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2364
diff
changeset
|
30 |
2338
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
31 add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1) |
1951
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
32 endif() |
2339
6e26d363dc53
USE_DCMTK_362_PRIVATE_DIC flag for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2338
diff
changeset
|
33 |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
34 if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
35 set(FirstRun OFF) |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
36 else() |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
37 set(FirstRun ON) |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
38 endif() |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
39 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
40 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}") |
929 | 41 |
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
|
42 |
2356
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
43 if (FirstRun) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
44 if (USE_DCMTK_360) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
45 # If using DCMTK 3.6.0, backport the "private.dic" file from DCMTK |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
46 # 3.6.2. This adds support for more private tags, and fixes some |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
47 # import problems with Philips MRI Achieva. |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
48 if (USE_DCMTK_362_PRIVATE_DIC) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
49 message("Using the dictionary of private tags from DCMTK 3.6.2") |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
50 configure_file( |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
51 ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.2-private.dic |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
52 ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
53 COPYONLY) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
54 else() |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
55 message("Using the dictionary of private tags from DCMTK 3.6.0") |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
56 endif() |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
57 |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
58 # Patches specific to DCMTK 3.6.0 |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
59 message("Applying patch to solve vulnerability in DCMTK 3.6.0") |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
60 execute_process( |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
61 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
62 ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-dulparse-vulnerability.patch |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
63 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
64 RESULT_VARIABLE Failure |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
65 ) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
66 |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
67 if (Failure) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
68 message(FATAL_ERROR "Error while patching a file") |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
69 endif() |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
70 |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
71 # This patch is not needed anymore thanks to the following commit |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
72 # (information sent by Jorg Riesmeier on Twitter on 2017-07-19): |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
73 # http://git.dcmtk.org/?p=dcmtk.git;a=commit;h=8df1f5e517b8629ae09088d0935c2a8dd333c76f |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
74 message("Applying patch for speed in DCMTK 3.6.0") |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
75 execute_process( |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
76 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
77 ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.0-speed.patch |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
78 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
79 RESULT_VARIABLE Failure |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
80 ) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
81 |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
82 if (Failure) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
83 message(FATAL_ERROR "Error while patching a file") |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
84 endif() |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
85 |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
86 else (FirstRun()) |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
87 message("No need to apply a patch for speed in DCMTK") |
2339
6e26d363dc53
USE_DCMTK_362_PRIVATE_DIC flag for cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2338
diff
changeset
|
88 endif() |
2356
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
89 else() |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
90 message("The patches for DCMTK have already been applied") |
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
|
91 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
|
92 |
1414 | 93 IF (CMAKE_CROSSCOMPILING) |
2344 | 94 if (CMAKE_COMPILER_IS_GNUCXX AND |
95 ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") # MinGW | |
96 SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.") | |
97 else() | |
98 message(FATAL_ERROR "Support your platform here") | |
99 endif() | |
929 | 100 ENDIF() |
2344 | 101 |
1634 | 102 SET(DCMTK_SOURCE_DIR ${DCMTK_SOURCES_DIR}) |
929 | 103 include(${DCMTK_SOURCES_DIR}/CMake/CheckFunctionWithHeaderExists.cmake) |
104 include(${DCMTK_SOURCES_DIR}/CMake/GenerateDCMTKConfigure.cmake) | |
105 | |
106 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") | |
107 set(HAVE_SSTREAM 1) | |
108 set(HAVE_PROTOTYPE_BZERO 1) | |
109 set(HAVE_PROTOTYPE_GETHOSTNAME 1) | |
110 set(HAVE_PROTOTYPE_GETSOCKOPT 1) | |
111 set(HAVE_PROTOTYPE_SETSOCKOPT 1) | |
112 set(HAVE_PROTOTYPE_CONNECT 1) | |
113 set(HAVE_PROTOTYPE_BIND 1) | |
114 set(HAVE_PROTOTYPE_ACCEPT 1) | |
115 set(HAVE_PROTOTYPE_SETSOCKNAME 1) | |
116 set(HAVE_PROTOTYPE_GETSOCKNAME 1) | |
117 endif() | |
118 | |
1149
dd6d7fd82da9
fix version of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1057
diff
changeset
|
119 set(DCMTK_PACKAGE_VERSION_SUFFIX "") |
1634 | 120 set(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_VERSION_NUMBER}) |
1149
dd6d7fd82da9
fix version of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1057
diff
changeset
|
121 |
929 | 122 CONFIGURE_FILE( |
123 ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in | |
124 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h) | |
125 | |
2338
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
126 if (NOT USE_DCMTK_360) |
2344 | 127 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
128 link_libraries(netapi32) # For NetWkstaUserGetInfo@12 | |
129 link_libraries(iphlpapi) # For GetAdaptersInfo@8 | |
130 | |
131 # Configure Wine if cross-compiling for Windows | |
132 if (CMAKE_COMPILER_IS_GNUCXX) | |
133 include(${DCMTK_SOURCES_DIR}/CMake/dcmtkUseWine.cmake) | |
134 FIND_PROGRAM(WINE_WINE_PROGRAM wine) | |
135 FIND_PROGRAM(WINE_WINEPATH_PROGRAM winepath) | |
136 list(APPEND DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=-static") | |
137 endif() | |
2340 | 138 endif() |
139 | |
1951
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
140 # This step must be after the generation of "osconfig.h" |
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
141 INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES() |
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
142 endif() |
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
143 |
929 | 144 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES) |
145 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/ofstd/libsrc DCMTK_SOURCES) | |
146 | |
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
|
147 if (ENABLE_DCMTK_NETWORKING) |
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
|
148 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmnet/libsrc DCMTK_SOURCES) |
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
|
149 include_directories( |
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
|
150 ${DCMTK_SOURCES_DIR}/dcmnet/include |
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
|
151 ) |
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
|
152 endif() |
929 | 153 |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2376
diff
changeset
|
154 if (ENABLE_DCMTK_JPEG) |
929 | 155 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc DCMTK_SOURCES) |
156 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libijg8 DCMTK_SOURCES) | |
157 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libijg12 DCMTK_SOURCES) | |
158 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpeg/libijg16 DCMTK_SOURCES) | |
159 include_directories( | |
160 ${DCMTK_SOURCES_DIR}/dcmjpeg/include | |
161 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg8 | |
162 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg12 | |
163 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg16 | |
164 ${DCMTK_SOURCES_DIR}/dcmimgle/include | |
165 ) | |
166 list(REMOVE_ITEM DCMTK_SOURCES | |
167 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/ddpiimpl.cc | |
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
|
168 |
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
|
169 # Disable support for encoding JPEG (modification in Orthanc 1.0.1) |
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
|
170 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djcodece.cc |
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
|
171 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsv1.cc |
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
|
172 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencbas.cc |
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
|
173 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencpro.cc |
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
|
174 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djenclol.cc |
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
|
175 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencode.cc |
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
|
176 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencext.cc |
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
|
177 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsps.cc |
929 | 178 ) |
179 endif() | |
180 | |
181 | |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2376
diff
changeset
|
182 if (ENABLE_DCMTK_JPEG_LOSSLESS) |
929 | 183 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpls/libsrc DCMTK_SOURCES) |
184 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmjpls/libcharls DCMTK_SOURCES) | |
185 include_directories( | |
186 ${DCMTK_SOURCES_DIR}/dcmjpeg/include | |
187 ${DCMTK_SOURCES_DIR}/dcmjpls/include | |
188 ${DCMTK_SOURCES_DIR}/dcmjpls/libcharls | |
189 ) | |
190 list(REMOVE_ITEM DCMTK_SOURCES | |
191 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djcodece.cc | |
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
|
192 |
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
|
193 # Disable support for encoding JPEG-LS (modification in Orthanc 1.0.1) |
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
|
194 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djencode.cc |
929 | 195 ) |
196 list(APPEND DCMTK_SOURCES | |
197 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djrplol.cc | |
198 ) | |
199 endif() | |
200 | |
201 | |
202 # Source for the logging facility of DCMTK | |
203 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/oflog/libsrc DCMTK_SOURCES) | |
204 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR | |
930 | 205 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR |
1337 | 206 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR |
2364 | 207 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR |
208 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") | |
929 | 209 list(REMOVE_ITEM DCMTK_SOURCES |
1951
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
210 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc |
929 | 211 ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc |
212 ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc | |
213 ) | |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
214 |
929 | 215 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
216 list(REMOVE_ITEM DCMTK_SOURCES | |
217 ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc | |
2340 | 218 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc |
929 | 219 ) |
220 | |
2356
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
221 if (CMAKE_COMPILER_IS_GNUCXX AND |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
222 DCMTK_PATCH_MINGW64 AND |
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
223 USE_DCMTK_360) |
929 | 224 # This is a patch for MinGW64 |
225 execute_process( | |
1951
01de36d949c3
Possibility to use forthcoming DCMTK 3.6.1 in static builds (instead of 3.6.0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1943
diff
changeset
|
226 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${DCMTK_PATCH_MINGW64} |
929 | 227 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
228 RESULT_VARIABLE Failure |
929 | 229 ) |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
230 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
231 if (Failure AND FirstRun) |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
232 message(FATAL_ERROR "Error while patching a file") |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1415
diff
changeset
|
233 endif() |
929 | 234 endif() |
235 endif() | |
236 | |
237 list(REMOVE_ITEM DCMTK_SOURCES | |
238 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc | |
239 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc | |
240 ) | |
241 | |
2338
86a99fd1bbfb
switch to just-released dcmtk 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2297
diff
changeset
|
242 if (USE_DCMTK_360) |
2150 | 243 # Removing this file is required with DCMTK 3.6.0 |
244 list(REMOVE_ITEM DCMTK_SOURCES | |
245 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdictbi.cc | |
246 ) | |
247 endif() | |
248 | |
1149
dd6d7fd82da9
fix version of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1057
diff
changeset
|
249 #set_source_files_properties(${DCMTK_SOURCES} |
dd6d7fd82da9
fix version of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1057
diff
changeset
|
250 # PROPERTIES COMPILE_DEFINITIONS |
1636 | 251 # "PACKAGE_VERSION=\"${DCMTK_PACKAGE_VERSION}\";PACKAGE_VERSION_NUMBER=\"${DCMTK_VERSION_NUMBER}\"") |
1149
dd6d7fd82da9
fix version of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1057
diff
changeset
|
252 |
929 | 253 # This fixes crashes related to the destruction of the DCMTK OFLogger |
254 # http://support.dcmtk.org/docs-snapshot/file_macros.html | |
255 add_definitions( | |
256 -DLOG4CPLUS_DISABLE_FATAL=1 | |
1634 | 257 -DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER} |
929 | 258 ) |
259 | |
260 include_directories( | |
261 #${DCMTK_SOURCES_DIR} | |
262 ${DCMTK_SOURCES_DIR}/config/include | |
263 ${DCMTK_SOURCES_DIR}/ofstd/include | |
264 ${DCMTK_SOURCES_DIR}/oflog/include | |
265 ${DCMTK_SOURCES_DIR}/dcmdata/include | |
266 ) | |
267 | |
268 source_group(ThirdParty\\Dcmtk REGULAR_EXPRESSION ${DCMTK_SOURCES_DIR}/.*) | |
269 | |
270 set(DCMTK_BUNDLES_LOG4CPLUS 1) | |
271 | |
272 if (STANDALONE_BUILD) | |
1770 | 273 set(DCMTK_USE_EMBEDDED_DICTIONARIES 1) |
274 set(DCMTK_DICTIONARIES | |
275 DICTIONARY_DICOM ${DCMTK_SOURCES_DIR}/dcmdata/data/dicom.dic | |
276 DICTIONARY_PRIVATE ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic | |
277 DICTIONARY_DICONDE ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic | |
278 ) | |
929 | 279 else() |
1770 | 280 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) |
929 | 281 endif() |
282 | |
283 else() | |
284 # The following line allows to manually add libraries at the | |
285 # command-line, which is necessary for Ubuntu/Debian packages | |
286 set(tmp "${DCMTK_LIBRARIES}") | |
287 include(FindDCMTK) | |
288 list(APPEND DCMTK_LIBRARIES "${tmp}") | |
289 | |
1943
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
290 include_directories(${DCMTK_INCLUDE_DIRS}) |
929 | 291 |
292 add_definitions( | |
293 -DHAVE_CONFIG_H=1 | |
294 ) | |
295 | |
1943
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
296 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
|
297 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
|
298 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
|
299 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
|
300 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
|
301 set(DCMTK_CONFIGURATION_FILE "${DCMTK_INCLUDE_DIRS}/dcmtk/config/osconfig.h") |
929 | 302 else() |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
303 message(FATAL_ERROR "Please install libdcmtk*-dev") |
929 | 304 endif() |
305 | |
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
|
306 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
|
307 |
929 | 308 # Autodetection of the version of DCMTK |
309 file(STRINGS | |
310 "${DCMTK_CONFIGURATION_FILE}" | |
311 DCMTK_VERSION_NUMBER1 REGEX | |
312 ".*PACKAGE_VERSION .*") | |
313 | |
314 string(REGEX REPLACE | |
315 ".*PACKAGE_VERSION.*\"([0-9]*)\\.([0-9]*)\\.([0-9]*)\"$" | |
316 "\\1\\2\\3" | |
317 DCMTK_VERSION_NUMBER | |
318 ${DCMTK_VERSION_NUMBER1}) | |
319 | |
1770 | 320 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) |
321 endif() | |
929 | 322 |
323 | |
324 add_definitions(-DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER}) | |
325 message("DCMTK version: ${DCMTK_VERSION_NUMBER}") | |
1770 | 326 |
327 | |
328 add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=${DCMTK_USE_EMBEDDED_DICTIONARIES}) | |
329 if (NOT DCMTK_USE_EMBEDDED_DICTIONARIES) | |
330 # Lookup for DICOM dictionaries, if none is specified by the user | |
331 if (DCMTK_DICTIONARY_DIR STREQUAL "") | |
332 find_path(DCMTK_DICTIONARY_DIR_AUTO dicom.dic | |
333 /usr/share/dcmtk | |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
334 /usr/share/libdcmtk1 |
1770 | 335 /usr/share/libdcmtk2 |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
336 /usr/share/libdcmtk3 |
1770 | 337 /usr/share/libdcmtk4 |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
338 /usr/share/libdcmtk5 |
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
339 /usr/share/libdcmtk6 |
2064
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
340 /usr/share/libdcmtk7 |
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
341 /usr/share/libdcmtk8 |
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
342 /usr/share/libdcmtk9 |
2288
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
343 /usr/share/libdcmtk10 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
344 /usr/share/libdcmtk11 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
345 /usr/share/libdcmtk12 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
346 /usr/share/libdcmtk13 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
347 /usr/share/libdcmtk14 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
348 /usr/share/libdcmtk15 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
349 /usr/share/libdcmtk16 |
1770 | 350 /usr/local/share/dcmtk |
351 ) | |
352 | |
353 if (${DCMTK_DICTIONARY_DIR_AUTO} MATCHES "DCMTK_DICTIONARY_DIR_AUTO-NOTFOUND") | |
354 message(FATAL_ERROR "Cannot locate the DICOM dictionary on this system") | |
355 endif() | |
356 | |
357 message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}") | |
358 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}") | |
359 else() | |
360 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}") | |
361 endif() | |
362 endif() |