Mercurial > hg > orthanc
comparison Resources/CMake/DcmtkConfiguration.cmake @ 1638:158e7b6f859a dcmtk-3.6.1
dcmtk 3.6.1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Sep 2015 10:23:22 +0200 |
parents | dfbde7c3fe19 |
children | 1b82bb0446d2 |
comparison
equal
deleted
inserted
replaced
1637:dfbde7c3fe19 | 1638:158e7b6f859a |
---|---|
15 | 15 |
16 if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) | 16 if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) |
17 SET(DCMTK_VERSION_NUMBER 361) | 17 SET(DCMTK_VERSION_NUMBER 361) |
18 set(DCMTK_PACKAGE_VERSION "3.6.1") | 18 set(DCMTK_PACKAGE_VERSION "3.6.1") |
19 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.1_20150629) | 19 SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.1_20150629) |
20 SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.1_20150629.zip") | 20 SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.1_20150629.tar.gz") |
21 SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4") | 21 SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4") |
22 | 22 |
23 if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") | 23 if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") |
24 set(FirstRun OFF) | 24 set(FirstRun OFF) |
25 else() | 25 else() |
29 # Definitions for DCMTK 3.6.1 | 29 # Definitions for DCMTK 3.6.1 |
30 macro(DCMTK_UNSET) | 30 macro(DCMTK_UNSET) |
31 endmacro() | 31 endmacro() |
32 | 32 |
33 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) | 33 set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) |
34 add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1) | |
34 # End | 35 # End |
35 | 36 |
36 | 37 |
37 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}") | 38 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}") |
38 | 39 |
61 | 62 |
62 CONFIGURE_FILE( | 63 CONFIGURE_FILE( |
63 ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in | 64 ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in |
64 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h) | 65 ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h) |
65 | 66 |
67 | |
68 execute_process( | |
69 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-speed.patch | |
70 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | |
71 RESULT_VARIABLE Failure | |
72 ) | |
73 | |
74 if (Failure AND FirstRun) | |
75 message(FATAL_ERROR "Error while patching a file") | |
76 endif() | |
77 | |
78 | |
66 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmnet/libsrc DCMTK_SOURCES) | 79 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmnet/libsrc DCMTK_SOURCES) |
67 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES) | 80 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES) |
68 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/ofstd/libsrc DCMTK_SOURCES) | 81 AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/ofstd/libsrc DCMTK_SOURCES) |
69 | 82 |
70 | 83 |
108 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR | 121 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR |
109 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR | 122 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR |
110 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR | 123 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR |
111 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") | 124 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") |
112 list(REMOVE_ITEM DCMTK_SOURCES | 125 list(REMOVE_ITEM DCMTK_SOURCES |
126 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc | |
113 ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc | 127 ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc |
114 ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc | 128 ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc |
115 ) | 129 ) |
116 | 130 |
117 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 131 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
118 list(REMOVE_ITEM DCMTK_SOURCES | 132 list(REMOVE_ITEM DCMTK_SOURCES |
133 ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc | |
119 ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc | 134 ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc |
120 ) | 135 ) |
121 endif() | 136 endif() |
122 | 137 |
123 list(REMOVE_ITEM DCMTK_SOURCES | 138 list(REMOVE_ITEM DCMTK_SOURCES |