annotate OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake @ 4044:d25f4c0fa160 framework

splitting code into OrthancFramework and OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jun 2020 20:30:34 +0200
parents Resources/CMake/DcmtkConfiguration.cmake@9d2d2c1afcec
children 304842a0d152
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
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)
3719
d737173197e1 upgraded DCMTK to 3.6.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3599
diff changeset
12 elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.5")
d737173197e1 upgraded DCMTK to 3.6.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3599
diff changeset
13 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.5.cmake)
2356
7b3b82d426ed removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2344
diff changeset
14 else()
3274
95b0536be2c3 preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
15 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
16 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
17
2515
7c8a246e8652 fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2513
diff changeset
18
3274
95b0536be2c3 preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
19 ##
95b0536be2c3 preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
20 ## Commands shared by all versions of DCMTK
95b0536be2c3 preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
21 ##
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
22
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
23 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
24 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
25
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
26 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
27 ${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
28 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc
3597
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
29 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict_orthanc.cc
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
30 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
31
4018
9d2d2c1afcec fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3973
diff changeset
32 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
9d2d2c1afcec fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3973
diff changeset
33 message(${DCMTK_SOURCES_DIR})
9d2d2c1afcec fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3973
diff changeset
34 list(REMOVE_ITEM DCMTK_SOURCES
9d2d2c1afcec fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3973
diff changeset
35 ${DCMTK_SOURCES_DIR}/ofstd/libsrc/offilsys.cc
9d2d2c1afcec fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3973
diff changeset
36 )
9d2d2c1afcec fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3973
diff changeset
37 endif()
9d2d2c1afcec fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3973
diff changeset
38
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
39 if (ENABLE_DCMTK_NETWORKING)
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}/dcmnet/libsrc 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}/dcmnet/include
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
43 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
44 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
45
3764
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
46 if (ENABLE_DCMTK_TRANSCODING)
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
47 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmimgle/libsrc DCMTK_SOURCES)
3765
4a25727401cd first transcoding to jpeg 8bpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3764
diff changeset
48 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmimage/libsrc DCMTK_SOURCES)
4a25727401cd first transcoding to jpeg 8bpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3764
diff changeset
49 include_directories(
4a25727401cd first transcoding to jpeg 8bpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3764
diff changeset
50 ${DCMTK_SOURCES_DIR}/dcmimage/include
4a25727401cd first transcoding to jpeg 8bpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3764
diff changeset
51 )
3764
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
52 endif()
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
53
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
54 if (ENABLE_DCMTK_JPEG)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
55 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
56 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
57 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
58 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
59 include_directories(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
60 ${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
61 ${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
62 ${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
63 ${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
64 ${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
65 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
66 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
67 ${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
68
3599
e01900f913e7 fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3597
diff changeset
69 # Solves linking problem in WebAssembly: "wasm-ld: error:
e01900f913e7 fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3597
diff changeset
70 # duplicate symbol: jaritab" (modification in Orthanc 1.5.9)
e01900f913e7 fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3597
diff changeset
71 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg8/jaricom.c
e01900f913e7 fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3597
diff changeset
72 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg12/jaricom.c
e01900f913e7 fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3597
diff changeset
73 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg24/jaricom.c
3764
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
74 )
3599
e01900f913e7 fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3597
diff changeset
75
3764
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
76 if (NOT ENABLE_DCMTK_TRANSCODING)
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
77 list(REMOVE_ITEM DCMTK_SOURCES
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
78 # Disable support for encoding JPEG (modification in Orthanc 1.0.1)
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
79 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djcodece.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
80 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsv1.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
81 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencbas.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
82 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencpro.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
83 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djenclol.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
84 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencode.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
85 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencext.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
86 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsps.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
87 )
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
88 endif()
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
89 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
90
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
91
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
92 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
93 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
94 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
95 include_directories(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
96 ${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
97 ${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
98 ${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
99 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
100 list(APPEND DCMTK_SOURCES
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
101 ${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
102 )
3764
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
103
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
104 if (NOT ENABLE_DCMTK_TRANSCODING)
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
105 list(REMOVE_ITEM DCMTK_SOURCES
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
106 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djcodece.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
107
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
108 # Disable support for encoding JPEG-LS (modification in Orthanc 1.0.1)
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
109 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djencode.cc
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
110 )
d55768319f8e fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
111 endif()
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
112 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3274
diff changeset
113
2344
8a5c8af669cb fix for osx
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2341
diff changeset
114
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
115 # This fixes crashes related to the destruction of the DCMTK OFLogger
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
116 # http://support.dcmtk.org/docs-snapshot/file_macros.html
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
117 add_definitions(
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
118 -DLOG4CPLUS_DISABLE_FATAL=1
1634
c095b0ddeea6 improvement
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1546
diff changeset
119 -DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER}
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
120 )
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
121
3316
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
122
2928
85999ed092c5 New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2546
diff changeset
123 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
124 # 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
125 # 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
126 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
127 -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
128 -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
129 -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
130 -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
131 -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
132 )
85999ed092c5 New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2546
diff changeset
133 endif()
85999ed092c5 New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2546
diff changeset
134
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
135 include_directories(
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
136 #${DCMTK_SOURCES_DIR}
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
137 ${DCMTK_SOURCES_DIR}/config/include
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
138 ${DCMTK_SOURCES_DIR}/ofstd/include
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
139 ${DCMTK_SOURCES_DIR}/oflog/include
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
140 ${DCMTK_SOURCES_DIR}/dcmdata/include
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
141 )
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
142
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
143 source_group(ThirdParty\\Dcmtk REGULAR_EXPRESSION ${DCMTK_SOURCES_DIR}/.*)
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
144
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
145 if (STANDALONE_BUILD)
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
146 set(DCMTK_USE_EMBEDDED_DICTIONARIES 1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
147 set(DCMTK_DICTIONARIES
3274
95b0536be2c3 preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
148 DICTIONARY_DICOM ${DCMTK_SOURCES_DIR}/dcmdata/data/dicom.dic
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
149 DICTIONARY_PRIVATE ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
150 DICTIONARY_DICONDE ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
151 )
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
152 else()
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
153 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0)
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
154 endif()
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
155
3274
95b0536be2c3 preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
156
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
157 else()
3833
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
158 if (CMAKE_CROSSCOMPILING AND
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
159 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
160
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
161 CHECK_INCLUDE_FILE_CXX(dcmtk/dcmdata/dcfilefo.h HAVE_DCMTK_H)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
162 if (NOT HAVE_DCMTK_H)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
163 message(FATAL_ERROR "Please install the libdcmtk-dev package")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
164 endif()
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
165
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
166 CHECK_LIBRARY_EXISTS(dcmdata "dcmDataDict" "" HAVE_DCMTK_LIB)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
167 if (NOT HAVE_DCMTK_LIB)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
168 message(FATAL_ERROR "Please install the libdcmtk package")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
169 endif()
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
170
3833
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
171 find_path(DCMTK_INCLUDE_DIRS dcmtk/config/osconfig.h
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
172 /usr/include
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
173 )
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
174
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
175 link_libraries(dcmdata dcmnet dcmjpeg oflog ofstd)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
176
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
177 else()
3973
d86bddb50972 fix spelling errors according to debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3839
diff changeset
178 # The following line allows one to manually add libraries at the
3833
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
179 # command-line, which is necessary for Ubuntu/Debian packages
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
180 set(tmp "${DCMTK_LIBRARIES}")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
181 include(FindDCMTK)
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
182 list(APPEND DCMTK_LIBRARIES "${tmp}")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
183
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
184 include_directories(${DCMTK_INCLUDE_DIRS})
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
185 endif()
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
186
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
187 add_definitions(
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
188 -DHAVE_CONFIG_H=1
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
189 )
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
190
1943
bc949ea71fe6 Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1914
diff changeset
191 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
192 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
193 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
194 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
195 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
196 set(DCMTK_CONFIGURATION_FILE "${DCMTK_INCLUDE_DIRS}/dcmtk/config/osconfig.h")
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
197 else()
1883
71356f41ec2f additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1846
diff changeset
198 message(FATAL_ERROR "Please install libdcmtk*-dev")
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
199 endif()
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
200
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
201 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
202
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
203 # Autodetection of the version of DCMTK
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
204 file(STRINGS
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
205 "${DCMTK_CONFIGURATION_FILE}"
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
206 DCMTK_VERSION_NUMBER1 REGEX
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
207 ".*PACKAGE_VERSION .*")
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
208
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
209 string(REGEX REPLACE
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
210 ".*PACKAGE_VERSION.*\"([0-9]*)\\.([0-9]*)\\.([0-9]*)\"$"
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
211 "\\1\\2\\3"
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
212 DCMTK_VERSION_NUMBER
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
213 ${DCMTK_VERSION_NUMBER1})
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
214
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
215 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
216 endif()
929
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
217
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
218
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
219 add_definitions(-DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER})
401a8273fd71 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
220 message("DCMTK version: ${DCMTK_VERSION_NUMBER}")
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
221
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
222
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
223 add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=${DCMTK_USE_EMBEDDED_DICTIONARIES})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
224 if (NOT DCMTK_USE_EMBEDDED_DICTIONARIES)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
225 # Lookup for DICOM dictionaries, if none is specified by the user
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
226 if (DCMTK_DICTIONARY_DIR STREQUAL "")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
227 find_path(DCMTK_DICTIONARY_DIR_AUTO dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
228 /usr/share/dcmtk
1883
71356f41ec2f additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1846
diff changeset
229 /usr/share/libdcmtk1
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
230 /usr/share/libdcmtk2
1883
71356f41ec2f additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1846
diff changeset
231 /usr/share/libdcmtk3
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
232 /usr/share/libdcmtk4
1883
71356f41ec2f additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1846
diff changeset
233 /usr/share/libdcmtk5
71356f41ec2f additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1846
diff changeset
234 /usr/share/libdcmtk6
2064
e92280e63d8d fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1951
diff changeset
235 /usr/share/libdcmtk7
e92280e63d8d fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1951
diff changeset
236 /usr/share/libdcmtk8
e92280e63d8d fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1951
diff changeset
237 /usr/share/libdcmtk9
2288
c6772af6dea3 fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2287
diff changeset
238 /usr/share/libdcmtk10
c6772af6dea3 fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2287
diff changeset
239 /usr/share/libdcmtk11
c6772af6dea3 fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2287
diff changeset
240 /usr/share/libdcmtk12
c6772af6dea3 fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2287
diff changeset
241 /usr/share/libdcmtk13
c6772af6dea3 fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2287
diff changeset
242 /usr/share/libdcmtk14
c6772af6dea3 fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2287
diff changeset
243 /usr/share/libdcmtk15
c6772af6dea3 fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2287
diff changeset
244 /usr/share/libdcmtk16
2515
7c8a246e8652 fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2513
diff changeset
245 /usr/share/libdcmtk17
7c8a246e8652 fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2513
diff changeset
246 /usr/share/libdcmtk18
7c8a246e8652 fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2513
diff changeset
247 /usr/share/libdcmtk19
7c8a246e8652 fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2513
diff changeset
248 /usr/share/libdcmtk20
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
249 /usr/local/share/dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
250 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
251
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
252 if (${DCMTK_DICTIONARY_DIR_AUTO} MATCHES "DCMTK_DICTIONARY_DIR_AUTO-NOTFOUND")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
253 message(FATAL_ERROR "Cannot locate the DICOM dictionary on this system")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
254 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
255
3833
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
256 if (CMAKE_CROSSCOMPILING AND
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
257 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
258 # Remove the sysroot prefix
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
259 file(RELATIVE_PATH tmp ${CMAKE_FIND_ROOT_PATH} ${DCMTK_DICTIONARY_DIR_AUTO})
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
260 set(DCMTK_DICTIONARY_DIR_AUTO /${tmp} CACHE INTERNAL "")
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
261 endif()
a3e38994d95a compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
262
1770
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
263 message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
264 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
265 else()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
266 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
267 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1769
diff changeset
268 endif()