diff 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
line wrap: on
line diff
--- a/Resources/CMake/DcmtkConfiguration.cmake	Wed Sep 23 10:00:26 2015 +0200
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Wed Sep 23 10:23:22 2015 +0200
@@ -17,7 +17,7 @@
   SET(DCMTK_VERSION_NUMBER 361)
   set(DCMTK_PACKAGE_VERSION "3.6.1")
   SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.1_20150629)
-  SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.1_20150629.zip")
+  SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.1_20150629.tar.gz")
   SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4")
 
   if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}")
@@ -31,6 +31,7 @@
   endmacro()
 
   set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/)
+  add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1)
   # End
 
 
@@ -63,6 +64,18 @@
     ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in
     ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h)
 
+
+  execute_process(
+    COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-speed.patch
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    RESULT_VARIABLE Failure
+    )
+
+  if (Failure AND FirstRun)
+    message(FATAL_ERROR "Error while patching a file")
+  endif()
+
+
   AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmnet/libsrc DCMTK_SOURCES)
   AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES)
   AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/ofstd/libsrc DCMTK_SOURCES)
@@ -110,12 +123,14 @@
       ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
       ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
     list(REMOVE_ITEM DCMTK_SOURCES 
+      ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc
       ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc
       ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc
       )
     
   elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
     list(REMOVE_ITEM DCMTK_SOURCES 
+      ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc
       ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc
       )
   endif()