Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake @ 5651:c4e33e0f907b
merge
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Wed, 05 Jun 2024 11:04:37 +0200 |
parents | f7adfb22e20e |
children |
rev | line source |
---|---|
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
5640
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5530
diff
changeset
|
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium |
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5530
diff
changeset
|
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5185
diff
changeset
|
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
7 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
8 # This program is free software: you can redistribute it and/or |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
9 # modify it under the terms of the GNU Lesser General Public License |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
10 # as published by the Free Software Foundation, either version 3 of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
11 # the License, or (at your option) any later version. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
12 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
13 # This program is distributed in the hope that it will be useful, but |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
14 # WITHOUT ANY WARRANTY; without even the implied warranty of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
16 # Lesser General Public License for more details. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
17 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
18 # You should have received a copy of the GNU Lesser General Public |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
19 # License along with this program. If not, see |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
20 # <http://www.gnu.org/licenses/>. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
21 |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
22 |
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
|
23 if (NOT DEFINED ENABLE_DCMTK_NETWORKING) |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
24 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
|
25 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
|
26 |
929 | 27 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
|
28 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
|
29 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
|
30 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
|
31 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
|
32 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
|
33 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
|
34 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
|
35 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.5.cmake) |
4470
06d164d8a0fd
upgrade to dcmtk 3.6.6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
36 elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.6") |
06d164d8a0fd
upgrade to dcmtk 3.6.6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
37 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.6.cmake) |
5067
6ad2bea0e07e
upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
38 elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.7") |
6ad2bea0e07e
upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
39 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.7.cmake) |
5487
33f8e180edcf
upgraded static build to dcmtk 3.6.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5486
diff
changeset
|
40 elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.8") |
33f8e180edcf
upgraded static build to dcmtk 3.6.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5486
diff
changeset
|
41 include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.8.cmake) |
2356
7b3b82d426ed
removal of unneeded patch for speed in DCMTK 3.6.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2344
diff
changeset
|
42 else() |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
43 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
|
44 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
|
45 |
2515
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
46 |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
47 ## |
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
48 ## Commands shared by all versions of DCMTK |
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
49 ## |
3279
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 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
|
52 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
|
53 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
54 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
|
55 ${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
|
56 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc |
3597 | 57 ${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
|
58 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
59 |
4018
9d2d2c1afcec
fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3973
diff
changeset
|
60 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
9d2d2c1afcec
fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3973
diff
changeset
|
61 message(${DCMTK_SOURCES_DIR}) |
9d2d2c1afcec
fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3973
diff
changeset
|
62 list(REMOVE_ITEM DCMTK_SOURCES |
9d2d2c1afcec
fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3973
diff
changeset
|
63 ${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
|
64 ) |
9d2d2c1afcec
fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3973
diff
changeset
|
65 endif() |
9d2d2c1afcec
fix build with recent versions of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3973
diff
changeset
|
66 |
3279
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
67 if (ENABLE_DCMTK_NETWORKING) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
68 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
|
69 include_directories( |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
70 ${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
|
71 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
72 endif() |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
73 |
3764
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
74 if (ENABLE_DCMTK_TRANSCODING) |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
75 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
|
76 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
|
77 include_directories( |
4a25727401cd
first transcoding to jpeg 8bpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3764
diff
changeset
|
78 ${DCMTK_SOURCES_DIR}/dcmimage/include |
4a25727401cd
first transcoding to jpeg 8bpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3764
diff
changeset
|
79 ) |
3764
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
80 endif() |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
81 |
3279
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
82 if (ENABLE_DCMTK_JPEG) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
83 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
|
84 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
|
85 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
|
86 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
|
87 include_directories( |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
88 ${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
|
89 ${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
|
90 ${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
|
91 ${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
|
92 ${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
|
93 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
94 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
|
95 ${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
|
96 |
3599
e01900f913e7
fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3597
diff
changeset
|
97 # 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
|
98 # 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
|
99 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg8/jaricom.c |
e01900f913e7
fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3597
diff
changeset
|
100 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg12/jaricom.c |
e01900f913e7
fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3597
diff
changeset
|
101 ${DCMTK_SOURCES_DIR}/dcmjpeg/libijg24/jaricom.c |
3764
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
102 ) |
3599
e01900f913e7
fix duplicate symbol "jaritab" in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3597
diff
changeset
|
103 |
3764
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 # 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
|
107 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djcodece.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
108 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsv1.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
109 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencbas.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
110 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencpro.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
111 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djenclol.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
112 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencode.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
113 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencext.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
114 ${DCMTK_SOURCES_DIR}/dcmjpeg/libsrc/djencsps.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
115 ) |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
116 endif() |
3279
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
117 endif() |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
118 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
119 |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
120 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
|
121 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
|
122 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
|
123 include_directories( |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
124 ${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
|
125 ${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
|
126 ${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
|
127 ) |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
128 list(APPEND DCMTK_SOURCES |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
129 ${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
|
130 ) |
3764
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
131 |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
132 if (NOT ENABLE_DCMTK_TRANSCODING) |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
133 list(REMOVE_ITEM DCMTK_SOURCES |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
134 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djcodece.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
135 |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
136 # 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
|
137 ${DCMTK_SOURCES_DIR}/dcmjpls/libsrc/djencode.cc |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
138 ) |
d55768319f8e
fix static build of dcmtk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
139 endif() |
3279
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
140 endif() |
dd10fe965870
use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3274
diff
changeset
|
141 |
4427
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
142 |
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
143 # New in Orthanc 1.9.0 for DICOM TLS |
4429
48ff722fad1f
don't compile TLS if DCMTK networking is disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4428
diff
changeset
|
144 if (ENABLE_DCMTK_NETWORKING AND ENABLE_SSL) |
4427
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
145 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmtls/libsrc DCMTK_SOURCES) |
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
146 include_directories( |
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
147 ${DCMTK_SOURCES_DIR}/dcmtls/include |
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
148 ) |
4428
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
149 |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
150 if (STATIC_BUILD OR NOT USE_SYSTEM_OPENSSL) |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
151 # The function "SSL_CTX_get0_param()" is available on both |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
152 # OpenSSL 1.0.x and 1.1.x that are used for static builds |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
153 set(HAVE_SSL_CTX_GET0_PARAM ON) |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
154 else() |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
155 # The call below requires "OpenSslConfiguration.cmake" to have |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
156 # been included beforehand (which is automatically done if using |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
157 # "OrthancFrameworkConfiguration.cmake") |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
158 CHECK_LIBRARY_EXISTS(ssl "SSL_CTX_get0_param" "" HAVE_SSL_CTX_GET0_PARAM) |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
159 endif() |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
160 |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
161 if (HAVE_SSL_CTX_GET0_PARAM) |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
162 message("Have SSL_CTX_get0_param(): yes") |
4431 | 163 add_definitions(-DHAVE_SSL_CTX_GET0_PARAM=1) |
4428
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
164 else() |
a9a596ed988d
autodetection of SSL_CTX_get0_param()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4427
diff
changeset
|
165 message("Have SSL_CTX_get0_param(): no") |
4430
f5d44e30b429
testing DICOM TLS in Orthanc SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4429
diff
changeset
|
166 endif() |
f5d44e30b429
testing DICOM TLS in Orthanc SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4429
diff
changeset
|
167 |
f5d44e30b429
testing DICOM TLS in Orthanc SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4429
diff
changeset
|
168 add_definitions(-DWITH_OPENSSL=1) |
4427
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
169 endif() |
30efda56500d
trying to enable TLS support in DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4170
diff
changeset
|
170 |
2344 | 171 |
929 | 172 # This fixes crashes related to the destruction of the DCMTK OFLogger |
173 # http://support.dcmtk.org/docs-snapshot/file_macros.html | |
174 add_definitions( | |
175 -DLOG4CPLUS_DISABLE_FATAL=1 | |
1634 | 176 -DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER} |
929 | 177 ) |
178 | |
3316
4b1017928fc4
Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3279
diff
changeset
|
179 |
2928
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
180 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
|
181 # 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
|
182 # 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
|
183 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
|
184 -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
|
185 -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
|
186 -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
|
187 -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
|
188 -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
|
189 ) |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
190 endif() |
85999ed092c5
New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2546
diff
changeset
|
191 |
929 | 192 include_directories( |
193 #${DCMTK_SOURCES_DIR} | |
194 ${DCMTK_SOURCES_DIR}/config/include | |
195 ${DCMTK_SOURCES_DIR}/ofstd/include | |
196 ${DCMTK_SOURCES_DIR}/oflog/include | |
197 ${DCMTK_SOURCES_DIR}/dcmdata/include | |
198 ) | |
199 | |
200 source_group(ThirdParty\\Dcmtk REGULAR_EXPRESSION ${DCMTK_SOURCES_DIR}/.*) | |
201 | |
202 if (STANDALONE_BUILD) | |
1770 | 203 set(DCMTK_USE_EMBEDDED_DICTIONARIES 1) |
204 set(DCMTK_DICTIONARIES | |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
205 DICTIONARY_DICOM ${DCMTK_SOURCES_DIR}/dcmdata/data/dicom.dic |
1770 | 206 DICTIONARY_PRIVATE ${DCMTK_SOURCES_DIR}/dcmdata/data/private.dic |
207 DICTIONARY_DICONDE ${DCMTK_SOURCES_DIR}/dcmdata/data/diconde.dic | |
208 ) | |
929 | 209 else() |
1770 | 210 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) |
929 | 211 endif() |
212 | |
3274
95b0536be2c3
preparing for dcmtk 3.6.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
213 |
929 | 214 else() |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
215 if (CMAKE_CROSSCOMPILING AND |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
216 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
217 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
218 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
|
219 if (NOT HAVE_DCMTK_H) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
220 message(FATAL_ERROR "Please install the libdcmtk-dev package") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
221 endif() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
222 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
223 CHECK_LIBRARY_EXISTS(dcmdata "dcmDataDict" "" HAVE_DCMTK_LIB) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
224 if (NOT HAVE_DCMTK_LIB) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
225 message(FATAL_ERROR "Please install the libdcmtk package") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
226 endif() |
929 | 227 |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
228 find_path(DCMTK_INCLUDE_DIRS dcmtk/config/osconfig.h |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
229 /usr/include |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
230 ) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
231 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
232 link_libraries(dcmdata dcmnet dcmjpeg oflog ofstd) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
233 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
234 else() |
3973
d86bddb50972
fix spelling errors according to debian
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3839
diff
changeset
|
235 # 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
|
236 # command-line, which is necessary for Ubuntu/Debian packages |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
237 set(tmp "${DCMTK_LIBRARIES}") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
238 include(FindDCMTK) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
239 list(APPEND DCMTK_LIBRARIES "${tmp}") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
240 |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
241 include_directories(${DCMTK_INCLUDE_DIRS}) |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
242 endif() |
929 | 243 |
244 add_definitions( | |
245 -DHAVE_CONFIG_H=1 | |
246 ) | |
247 | |
1943
bc949ea71fe6
Fix of Debian bug #818512 ("FTBFS: Please install libdcmtk*-dev")
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1914
diff
changeset
|
248 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
|
249 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
|
250 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
|
251 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
|
252 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
|
253 set(DCMTK_CONFIGURATION_FILE "${DCMTK_INCLUDE_DIRS}/dcmtk/config/osconfig.h") |
929 | 254 else() |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
255 message(FATAL_ERROR "Please install libdcmtk*-dev") |
929 | 256 endif() |
257 | |
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
|
258 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
|
259 |
929 | 260 # Autodetection of the version of DCMTK |
261 file(STRINGS | |
262 "${DCMTK_CONFIGURATION_FILE}" | |
263 DCMTK_VERSION_NUMBER1 REGEX | |
264 ".*PACKAGE_VERSION .*") | |
265 | |
266 string(REGEX REPLACE | |
267 ".*PACKAGE_VERSION.*\"([0-9]*)\\.([0-9]*)\\.([0-9]*)\"$" | |
268 "\\1\\2\\3" | |
269 DCMTK_VERSION_NUMBER | |
270 ${DCMTK_VERSION_NUMBER1}) | |
271 | |
1770 | 272 set(DCMTK_USE_EMBEDDED_DICTIONARIES 0) |
273 endif() | |
929 | 274 |
275 | |
276 add_definitions(-DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER}) | |
277 message("DCMTK version: ${DCMTK_VERSION_NUMBER}") | |
1770 | 278 |
279 | |
280 add_definitions(-DDCMTK_USE_EMBEDDED_DICTIONARIES=${DCMTK_USE_EMBEDDED_DICTIONARIES}) | |
281 if (NOT DCMTK_USE_EMBEDDED_DICTIONARIES) | |
282 # Lookup for DICOM dictionaries, if none is specified by the user | |
283 if (DCMTK_DICTIONARY_DIR STREQUAL "") | |
284 find_path(DCMTK_DICTIONARY_DIR_AUTO dicom.dic | |
285 /usr/share/dcmtk | |
5530
f88aaf269fda
extended search path for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5512
diff
changeset
|
286 /usr/share/dcmtk-3.6.8 |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
287 /usr/share/libdcmtk1 |
1770 | 288 /usr/share/libdcmtk2 |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
289 /usr/share/libdcmtk3 |
1770 | 290 /usr/share/libdcmtk4 |
1883
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
291 /usr/share/libdcmtk5 |
71356f41ec2f
additional locations for dicom.dic
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1846
diff
changeset
|
292 /usr/share/libdcmtk6 |
2064
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
293 /usr/share/libdcmtk7 |
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
294 /usr/share/libdcmtk8 |
e92280e63d8d
fix Debian #829608
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1951
diff
changeset
|
295 /usr/share/libdcmtk9 |
2288
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
296 /usr/share/libdcmtk10 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
297 /usr/share/libdcmtk11 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
298 /usr/share/libdcmtk12 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
299 /usr/share/libdcmtk13 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
300 /usr/share/libdcmtk14 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
301 /usr/share/libdcmtk15 |
c6772af6dea3
fix to find DICOM dictionaries in Debian Butter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2287
diff
changeset
|
302 /usr/share/libdcmtk16 |
2515
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
303 /usr/share/libdcmtk17 |
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
304 /usr/share/libdcmtk18 |
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
305 /usr/share/libdcmtk19 |
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
306 /usr/share/libdcmtk20 |
1770 | 307 /usr/local/share/dcmtk |
5486
e85bd2589ea6
FreeBSD: DCMTK 3.6.8 moved its datadir to /usr/local/share/dcmtk-3.6.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5485
diff
changeset
|
308 /usr/local/share/dcmtk-3.6.8 |
1770 | 309 ) |
310 | |
311 if (${DCMTK_DICTIONARY_DIR_AUTO} MATCHES "DCMTK_DICTIONARY_DIR_AUTO-NOTFOUND") | |
312 message(FATAL_ERROR "Cannot locate the DICOM dictionary on this system") | |
313 endif() | |
314 | |
3833
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
315 if (CMAKE_CROSSCOMPILING AND |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
316 "${CMAKE_SYSTEM_VERSION}" STREQUAL "CrossToolNg") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
317 # Remove the sysroot prefix |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
318 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
|
319 set(DCMTK_DICTIONARY_DIR_AUTO /${tmp} CACHE INTERNAL "") |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
320 endif() |
a3e38994d95a
compilation on mips qemu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3719
diff
changeset
|
321 |
1770 | 322 message("Autodetected path to the DICOM dictionaries: ${DCMTK_DICTIONARY_DIR_AUTO}") |
323 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR_AUTO}") | |
324 else() | |
325 add_definitions(-DDCMTK_DICTIONARY_DIR="${DCMTK_DICTIONARY_DIR}") | |
326 endif() | |
327 endif() |