annotate OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.7.cmake @ 5069:c22b4447ff73

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 15 Aug 2022 16:11:33 +0200
parents 6ad2bea0e07e
children 8fbe84997e23
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5067
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Department, University Hospital of Liege, Belgium
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 #
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # This program is free software: you can redistribute it and/or
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # modify it under the terms of the GNU Lesser General Public License
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # as published by the Free Software Foundation, either version 3 of
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # the License, or (at your option) any later version.
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 #
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful, but
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # Lesser General Public License for more details.
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 #
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # You should have received a copy of the GNU Lesser General Public
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 # License along with this program. If not, see
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 # <http://www.gnu.org/licenses/>.
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 SET(DCMTK_VERSION_NUMBER 367)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 SET(DCMTK_PACKAGE_VERSION "3.6.7")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.7)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 SET(DCMTK_URL "http://orthanc.osimis.io/ThirdPartyDownloads/dcmtk-3.6.7.tar.gz")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 SET(DCMTK_MD5 "e4d519bb315ec3944f3f1d61df465cbd")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 macro(DCMTK_UNSET)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 endmacro()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 macro(DCMTK_UNSET_CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 endmacro()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 set(DCMTK_BINARY_DIR ${DCMTK_SOURCES_DIR}/)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 set(DCMTK_WITH_THREADS OFF) # Disable thread support in wasm/asm.js
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 else()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 set(DCMTK_WITH_THREADS ON)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 set(FirstRun OFF)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 else()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 set(FirstRun ON)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 if (FirstRun)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 # Apply the patches
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 execute_process(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-3.6.7.patch
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 RESULT_VARIABLE Failure
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 )
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 if (Failure)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 message(FATAL_ERROR "Error while patching a file")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 configure_file(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-dcdict_orthanc.cc
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict_orthanc.cc
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 COPYONLY)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 else()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 message("The patches for DCMTK have already been applied")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 include_directories(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 ${DCMTK_SOURCES_DIR}/dcmiod/include
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 )
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 # C_CHAR_UNSIGNED *must* be set before calling "GenerateDCMTKConfigure.cmake"
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 IF (CMAKE_CROSSCOMPILING)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 if (CMAKE_COMPILER_IS_GNUCXX AND
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 CMAKE_SYSTEM_NAME STREQUAL "Windows") # MinGW
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # WebAssembly or asm.js
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 # Check out "../WebAssembly/ArithmeticTests/" to regenerate the
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 # "arith.h" file
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 configure_file(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 ${CMAKE_CURRENT_LIST_DIR}/WebAssembly/arith.h
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/arith.h
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 COPYONLY)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 UNSET(C_CHAR_UNSIGNED CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 SET(C_CHAR_UNSIGNED 0 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 else()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 message(FATAL_ERROR "Support your platform here")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ENDIF()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 SET(DCMTK_ENABLE_CHARSET_CONVERSION "iconv" CACHE STRING "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 SET(HAVE_SYS_GETTID 0 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 SET(DCMTK_SOURCE_DIR ${DCMTK_SOURCES_DIR})
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 include(${DCMTK_SOURCES_DIR}/CMake/CheckFunctionWithHeaderExists.cmake)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 include(${DCMTK_SOURCES_DIR}/CMake/GenerateDCMTKConfigure.cmake)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # WebAssembly or
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 # asm.js The macros below are not properly discovered by DCMTK
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 # when using WebAssembly. Check out "../WebAssembly/arith.h" for
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 # how we produced these values. This step MUST be after
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 # "GenerateDCMTKConfigure" and before the generation of
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 # "osconfig.h".
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 UNSET(SIZEOF_VOID_P CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 UNSET(SIZEOF_CHAR CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 UNSET(SIZEOF_DOUBLE CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 UNSET(SIZEOF_FLOAT CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 UNSET(SIZEOF_INT CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 UNSET(SIZEOF_LONG CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 UNSET(SIZEOF_SHORT CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 UNSET(SIZEOF_VOID_P CACHE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 SET(SIZEOF_CHAR 1 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 SET(SIZEOF_DOUBLE 8 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 SET(SIZEOF_FLOAT 4 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 SET(SIZEOF_INT 4 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 SET(SIZEOF_LONG 4 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 SET(SIZEOF_SHORT 2 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 set(DCMTK_PACKAGE_VERSION_SUFFIX "")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 set(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_VERSION_NUMBER})
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 # For the dcmtls module, necessary since DCMTK 3.6.7 (cf. file
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 # "dcmtls/libsrc/tlslayer.cc"). This must be done before the
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 # invokation of "configure_file()"!
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 CHECK_FUNCTIONWITHHEADER_EXISTS("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS)
5069
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
150 CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_RSA_PSS" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS)
5067
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID)
5069
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
152 CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_OPENSSL_PROTOTYPE_RAND_EGD)
5067
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS)
5069
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
156 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set0_tmp_dh_pkey" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
157 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_curves(0,0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
158 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_sigalgs" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
159 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_ecdh_auto(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
160 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_max_proto_version(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
161 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_security_level" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
162 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
163 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC_JOB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
164 CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_CLIENT_HELLO_CB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
165 CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5067
diff changeset
166 CHECK_FUNCTIONWITHHEADER_EXISTS("TLS_method" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS_METHOD)
5067
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 CONFIGURE_FILE(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 link_libraries(netapi32) # For NetWkstaUserGetInfo@12
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 link_libraries(iphlpapi) # For GetAdaptersInfo@8
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 # Configure Wine if cross-compiling for Windows
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 if (CMAKE_COMPILER_IS_GNUCXX)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 include(${DCMTK_SOURCES_DIR}/CMake/dcmtkUseWine.cmake)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 FIND_PROGRAM(WINE_WINE_PROGRAM wine)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 FIND_PROGRAM(WINE_WINEPATH_PROGRAM winepath)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 list(APPEND DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=-static")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 # This step must be after the generation of "osconfig.h"
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 # Source for the logging facility of DCMTK
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/oflog/libsrc DCMTK_SOURCES)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" OR
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 list(REMOVE_ITEM DCMTK_SOURCES
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 )
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 list(REMOVE_ITEM DCMTK_SOURCES
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 )
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 # Starting with DCMTK 3.6.2, the Nagle algorithm is not disabled by
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 # default since this does not seem to be appropriate (anymore) for
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 # most modern operating systems. In order to change this default, the
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 # environment variable NO_TCPDELAY can be set to "1" (see envvars.txt
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 # for details). Alternatively, the macro DISABLE_NAGLE_ALGORITHM can
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 # be defined to change this setting at compilation time (see
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 # macros.txt for details).
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 # https://forum.dcmtk.org/viewtopic.php?t=4632
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 add_definitions(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 -DDISABLE_NAGLE_ALGORITHM=1
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 )
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 # For compatibility with Windows XP, avoid using fiber-local-storage
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 # in log4cplus, but use thread-local-storage instead. Otherwise,
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 # Windows XP complains about missing "FlsGetValue()" in KERNEL32.dll
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 add_definitions(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 -DDCMTK_LOG4CPLUS_AVOID_WIN32_FLS
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 )
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 if (CMAKE_COMPILER_IS_GNUCXX OR # MinGW
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # MSVC for 32bit (*)
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 # (*) With multithreaded logging enabled, Visual Studio 2008 fails
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 # with error: ".\dcmtk-3.6.7\oflog\libsrc\globinit.cc(422) : error
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 # C2664: 'dcmtk::log4cplus::thread::impl::tls_init' : cannot
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 # convert parameter 1 from 'void (__stdcall *)(void *)' to
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 # 'dcmtk::log4cplus::thread::impl::tls_init_cleanup_func_type'"
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 # None of the functions with this name in scope match the target type
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 add_definitions(
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250 -DDCMTK_LOG4CPLUS_SINGLE_THREADED
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 )
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 endif()
6ad2bea0e07e upgrade to DCMTK 3.6.7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 endif()