annotate OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.5.cmake @ 5161:b6dc4606ab04

release notes for 1.11.3
author Alain Mazy <am@osimis.io>
date Fri, 03 Feb 2023 14:24:43 +0100
parents 43e613a7756b
children 0ea402b4d901
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
3 # Department, University Hospital of Liege, Belgium
4870
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
6 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
7 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
8 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
9 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
10 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
11 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
12 # 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: 4045
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
15 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
16 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
17 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
18 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
19 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
20
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
21
3719
d737173197e1 upgraded DCMTK to 3.6.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3598
diff changeset
22 SET(DCMTK_VERSION_NUMBER 365)
d737173197e1 upgraded DCMTK to 3.6.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3598
diff changeset
23 SET(DCMTK_PACKAGE_VERSION "3.6.5")
d737173197e1 upgraded DCMTK to 3.6.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3598
diff changeset
24 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.5)
d737173197e1 upgraded DCMTK to 3.6.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3598
diff changeset
25 SET(DCMTK_URL "http://orthanc.osimis.io/ThirdPartyDownloads/dcmtk-3.6.5.tar.gz")
d737173197e1 upgraded DCMTK to 3.6.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3598
diff changeset
26 SET(DCMTK_MD5 "e19707f64ee5695c496b9c1e48e39d07")
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 macro(DCMTK_UNSET)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 endmacro()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 macro(DCMTK_UNSET_CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 endmacro()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 set(DCMTK_BINARY_DIR ${DCMTK_SOURCES_DIR}/)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/)
3594
0654d0838de8 disable thread support in DCMTK if wasm/asm.js
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
36
0654d0838de8 disable thread support in DCMTK if wasm/asm.js
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
37 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
0654d0838de8 disable thread support in DCMTK if wasm/asm.js
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
38 set(DCMTK_WITH_THREADS OFF) # Disable thread support in wasm/asm.js
0654d0838de8 disable thread support in DCMTK if wasm/asm.js
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
39 else()
0654d0838de8 disable thread support in DCMTK if wasm/asm.js
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
40 set(DCMTK_WITH_THREADS ON)
0654d0838de8 disable thread support in DCMTK if wasm/asm.js
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
41 endif()
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 set(FirstRun OFF)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 else()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 set(FirstRun ON)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
54 if (FirstRun)
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
55 # Apply the patches
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
56 execute_process(
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
57 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
58 ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-3.6.5.patch
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
59 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
60 RESULT_VARIABLE Failure
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
61 )
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
62
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
63 if (Failure)
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
64 message(FATAL_ERROR "Error while patching a file")
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
65 endif()
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
66
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
67 configure_file(
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
68 ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-dcdict_orthanc.cc
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
69 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict_orthanc.cc
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
70 COPYONLY)
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
71 else()
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3316
diff changeset
72 message("The patches for DCMTK have already been applied")
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
73 endif()
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
74
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
75
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 include_directories(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 ${DCMTK_SOURCES_DIR}/dcmiod/include
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 # C_CHAR_UNSIGNED *must* be set before calling "GenerateDCMTKConfigure.cmake"
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 IF (CMAKE_CROSSCOMPILING)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 if (CMAKE_COMPILER_IS_GNUCXX AND
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 CMAKE_SYSTEM_NAME STREQUAL "Windows") # MinGW
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # WebAssembly or asm.js
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 # Check out "../WebAssembly/ArithmeticTests/" to regenerate the
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 # "arith.h" file
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 configure_file(
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
92 ${CMAKE_CURRENT_LIST_DIR}/WebAssembly/arith.h
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/arith.h
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 COPYONLY)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 UNSET(C_CHAR_UNSIGNED CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 SET(C_CHAR_UNSIGNED 0 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 else()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 message(FATAL_ERROR "Support your platform here")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ENDIF()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 SET(DCMTK_ENABLE_CHARSET_CONVERSION "iconv" CACHE STRING "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 SET(HAVE_SYS_GETTID 0 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 SET(DCMTK_SOURCE_DIR ${DCMTK_SOURCES_DIR})
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 include(${DCMTK_SOURCES_DIR}/CMake/CheckFunctionWithHeaderExists.cmake)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 include(${DCMTK_SOURCES_DIR}/CMake/GenerateDCMTKConfigure.cmake)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # WebAssembly or
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 # asm.js The macros below are not properly discovered by DCMTK
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 # when using WebAssembly. Check out "../WebAssembly/arith.h" for
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 # how we produced these values. This step MUST be after
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 # "GenerateDCMTKConfigure" and before the generation of
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 # "osconfig.h".
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 UNSET(SIZEOF_VOID_P CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 UNSET(SIZEOF_CHAR CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 UNSET(SIZEOF_DOUBLE CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 UNSET(SIZEOF_FLOAT CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 UNSET(SIZEOF_INT CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 UNSET(SIZEOF_LONG CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 UNSET(SIZEOF_SHORT CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 UNSET(SIZEOF_VOID_P CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 SET(SIZEOF_CHAR 1 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 SET(SIZEOF_DOUBLE 8 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 SET(SIZEOF_FLOAT 4 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 SET(SIZEOF_INT 4 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 SET(SIZEOF_LONG 4 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 SET(SIZEOF_SHORT 2 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 set(DCMTK_PACKAGE_VERSION_SUFFIX "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 set(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_VERSION_NUMBER})
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 CONFIGURE_FILE(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 link_libraries(netapi32) # For NetWkstaUserGetInfo@12
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 link_libraries(iphlpapi) # For GetAdaptersInfo@8
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 # Configure Wine if cross-compiling for Windows
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 if (CMAKE_COMPILER_IS_GNUCXX)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 include(${DCMTK_SOURCES_DIR}/CMake/dcmtkUseWine.cmake)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 FIND_PROGRAM(WINE_WINE_PROGRAM wine)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 FIND_PROGRAM(WINE_WINEPATH_PROGRAM winepath)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 list(APPEND DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=-static")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 # This step must be after the generation of "osconfig.h"
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 # Source for the logging facility of DCMTK
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/oflog/libsrc DCMTK_SOURCES)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" OR
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 list(REMOVE_ITEM DCMTK_SOURCES
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 list(REMOVE_ITEM DCMTK_SOURCES
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189
3316
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
190 # Starting with DCMTK 3.6.2, the Nagle algorithm is not disabled by
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
191 # default since this does not seem to be appropriate (anymore) for
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
192 # most modern operating systems. In order to change this default, the
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
193 # environment variable NO_TCPDELAY can be set to "1" (see envvars.txt
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
194 # for details). Alternatively, the macro DISABLE_NAGLE_ALGORITHM can
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
195 # be defined to change this setting at compilation time (see
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
196 # macros.txt for details).
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
197 # https://forum.dcmtk.org/viewtopic.php?t=4632
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
198 add_definitions(
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
199 -DDISABLE_NAGLE_ALGORITHM=1
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
200 )
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
201
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
202
3773
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
203 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
204 # For compatibility with Windows XP, avoid using fiber-local-storage
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
205 # in log4cplus, but use thread-local-storage instead. Otherwise,
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
206 # Windows XP complains about missing "FlsGetValue()" in KERNEL32.dll
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
207 add_definitions(
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
208 -DDCMTK_LOG4CPLUS_AVOID_WIN32_FLS
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
209 )
3773
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
210
3774
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
211 if (CMAKE_COMPILER_IS_GNUCXX OR # MinGW
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
212 "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # MSVC for 32bit (*)
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
213
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
214 # (*) With multithreaded logging enabled, Visual Studio 2008 fails
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
215 # with error: ".\dcmtk-3.6.5\oflog\libsrc\globinit.cc(422) : error
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
216 # C2664: 'dcmtk::log4cplus::thread::impl::tls_init' : cannot
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
217 # convert parameter 1 from 'void (__stdcall *)(void *)' to
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
218 # 'dcmtk::log4cplus::thread::impl::tls_init_cleanup_func_type'"
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
219 # None of the functions with this name in scope match the target type
6d2b94698995 fix for MSVC 32bit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3773
diff changeset
220
3773
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
221 add_definitions(
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
222 -DDCMTK_LOG4CPLUS_SINGLE_THREADED
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
223 )
df164cc69529 fix compatibility between MSVC and Windows XP
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
224 endif()
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3719
diff changeset
225 endif()