annotate Resources/CMake/DcmtkConfigurationStatic-3.6.4.cmake @ 3503:46cf170ba121

ImageProcessing::SeparableConvolution()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Aug 2019 12:10:13 +0200
parents 4b1017928fc4
children 0301f59450fe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 SET(DCMTK_VERSION_NUMBER 364)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 SET(DCMTK_PACKAGE_VERSION "3.6.4")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.4)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 SET(DCMTK_URL "http://orthanc.osimis.io/ThirdPartyDownloads/dcmtk-3.6.4.tar.gz")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 SET(DCMTK_MD5 "97597439a2ae7a39086066318db5f3bc")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 macro(DCMTK_UNSET)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 endmacro()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 macro(DCMTK_UNSET_CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 endmacro()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 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
14 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 set(DCMTK_WITH_THREADS ON)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 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
18
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 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
20 set(FirstRun OFF)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 else()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 set(FirstRun ON)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 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
26
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
28 # Apply the patches
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
29 execute_process(
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
30 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
31 ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.4.patch
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
32 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
33 RESULT_VARIABLE Failure
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
34 )
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
35
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
36 if (FirstRun AND Failure)
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
37 message(FATAL_ERROR "Error while patching files")
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
38 endif()
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
39
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3279
diff changeset
40
3279
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 include_directories(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${DCMTK_SOURCES_DIR}/dcmiod/include
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 )
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
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 # 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
47 IF (CMAKE_CROSSCOMPILING)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 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
49 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
50 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
51
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 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
53
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 # 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
55 # "arith.h" file
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 configure_file(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 ${ORTHANC_ROOT}/Resources/WebAssembly/arith.h
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 ${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
59 COPYONLY)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 UNSET(C_CHAR_UNSIGNED CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 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
63
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 else()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 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
66 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 ENDIF()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 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
71 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
72 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
73 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 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
77 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
78 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
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 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
82 # 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
83 # 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
84 # 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
85 # "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
86 # "osconfig.h".
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 UNSET(SIZEOF_VOID_P CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 UNSET(SIZEOF_CHAR CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 UNSET(SIZEOF_DOUBLE CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 UNSET(SIZEOF_FLOAT CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 UNSET(SIZEOF_INT CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 UNSET(SIZEOF_LONG CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 UNSET(SIZEOF_SHORT CACHE)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 UNSET(SIZEOF_VOID_P CACHE)
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 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
97 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
98 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
99 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
100 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
101 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
102 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
103 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
104 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 set(DCMTK_PACKAGE_VERSION_SUFFIX "")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 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
109
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 CONFIGURE_FILE(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 ${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
112 ${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
113
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 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
115 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
116 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
117
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 # 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
119 if (CMAKE_COMPILER_IS_GNUCXX)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 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
121 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
122 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
123 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
124 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 # 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
128 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
129 INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 # 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
134 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
135 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
136 ${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
137 ${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
138 ${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
139 ${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
140 ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 list(REMOVE_ITEM DCMTK_SOURCES
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 ${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
143 ${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
144 ${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
145 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 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
148 list(REMOVE_ITEM DCMTK_SOURCES
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ${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
150 ${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
151 )
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 endif()
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 if (ORTHANC_SANDBOXED)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 configure_file(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ${ORTHANC_ROOT}/Resources/WebAssembly/dcdict.h
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 ${DCMTK_SOURCES_DIR}/dcmdata/include/dcmtk/dcmdata/dcdict.h
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 COPYONLY)
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 configure_file(
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 ${ORTHANC_ROOT}/Resources/WebAssembly/dcdict.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 COPYONLY)
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 list(REMOVE_ITEM DCMTK_SOURCES
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc
dd10fe965870 use of DCMTK 3.6.4 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 )
3316
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
172
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
173
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
174 # 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
175 # 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
176 # 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
177 # 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
178 # 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
179 # 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
180 # 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
181 # 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
182 add_definitions(
4b1017928fc4 Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
183 -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
184 )