comparison Resources/CMake/DcmtkConfiguration.cmake @ 2523:21e2ed283cd5

fix wasm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 10 Apr 2018 16:48:49 +0200
parents ce2dfba9417c
children 6d5e36e1256f
comparison
equal deleted inserted replaced
2522:ce2dfba9417c 2523:21e2ed283cd5
99 else() 99 else()
100 message("The patches for DCMTK have already been applied") 100 message("The patches for DCMTK have already been applied")
101 endif() 101 endif()
102 102
103 103
104 # C_CHAR_UNSIGNED *must* be set before calling "GenerateDCMTKConfigure.cmake"
104 IF (CMAKE_CROSSCOMPILING) 105 IF (CMAKE_CROSSCOMPILING)
105 if (CMAKE_COMPILER_IS_GNUCXX AND 106 if (CMAKE_COMPILER_IS_GNUCXX AND
106 CMAKE_SYSTEM_NAME STREQUAL "Windows") # MinGW 107 CMAKE_SYSTEM_NAME STREQUAL "Windows") # MinGW
107 SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.") 108 SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.")
108 109
112 # "arith.h" file 113 # "arith.h" file
113 configure_file( 114 configure_file(
114 ${ORTHANC_ROOT}/Resources/WebAssembly/arith.h 115 ${ORTHANC_ROOT}/Resources/WebAssembly/arith.h
115 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/arith.h 116 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/arith.h
116 COPYONLY) 117 COPYONLY)
118
119 UNSET(C_CHAR_UNSIGNED CACHE)
120 SET(C_CHAR_UNSIGNED 0 CACHE INTERNAL "")
117 121
118 else() 122 else()
119 message(FATAL_ERROR "Support your platform here") 123 message(FATAL_ERROR "Support your platform here")
120 endif() 124 endif()
121 ENDIF() 125 ENDIF()
154 UNSET(SIZEOF_FLOAT CACHE) 158 UNSET(SIZEOF_FLOAT CACHE)
155 UNSET(SIZEOF_INT CACHE) 159 UNSET(SIZEOF_INT CACHE)
156 UNSET(SIZEOF_LONG CACHE) 160 UNSET(SIZEOF_LONG CACHE)
157 UNSET(SIZEOF_SHORT CACHE) 161 UNSET(SIZEOF_SHORT CACHE)
158 UNSET(SIZEOF_VOID_P CACHE) 162 UNSET(SIZEOF_VOID_P CACHE)
159 UNSET(C_CHAR_UNSIGNED CACHE)
160 163
161 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "") 164 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "")
162 SET(SIZEOF_CHAR 1 CACHE INTERNAL "") 165 SET(SIZEOF_CHAR 1 CACHE INTERNAL "")
163 SET(SIZEOF_DOUBLE 8 CACHE INTERNAL "") 166 SET(SIZEOF_DOUBLE 8 CACHE INTERNAL "")
164 SET(SIZEOF_FLOAT 4 CACHE INTERNAL "") 167 SET(SIZEOF_FLOAT 4 CACHE INTERNAL "")
165 SET(SIZEOF_INT 4 CACHE INTERNAL "") 168 SET(SIZEOF_INT 4 CACHE INTERNAL "")
166 SET(SIZEOF_LONG 4 CACHE INTERNAL "") 169 SET(SIZEOF_LONG 4 CACHE INTERNAL "")
167 SET(SIZEOF_SHORT 2 CACHE INTERNAL "") 170 SET(SIZEOF_SHORT 2 CACHE INTERNAL "")
168 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "") 171 SET(SIZEOF_VOID_P 4 CACHE INTERNAL "")
169 SET(C_CHAR_UNSIGNED 0 CACHE INTERNAL "")
170 endif() 172 endif()
171 173
172 174
173 set(DCMTK_PACKAGE_VERSION_SUFFIX "") 175 set(DCMTK_PACKAGE_VERSION_SUFFIX "")
174 set(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_VERSION_NUMBER}) 176 set(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_VERSION_NUMBER})