changeset 1633:b7dfb048b2f3 dcmtk-3.6.1

setup
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Sep 2015 09:55:23 +0200
parents eb8fbcf008b5
children 0844a4bcb0ad
files Resources/CMake/DcmtkConfiguration.cmake
diffstat 1 files changed, 15 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/DcmtkConfiguration.cmake	Mon Sep 21 14:05:06 2015 +0200
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Wed Sep 23 09:55:23 2015 +0200
@@ -14,10 +14,10 @@
 
 
 if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK)
-  SET(DCMTK_VERSION_NUMBER 360)
-  SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.0)
-  SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.0.zip")
-  SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4")
+  SET(DCMTK_VERSION_NUMBER 361)
+  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.tar.gz")
+  SET(DCMTK_MD5 "2faf73786fc638ae05fef0103cce0eea")
 
   if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}")
     set(FirstRun OFF)
@@ -25,12 +25,20 @@
     set(FirstRun ON)
   endif()
 
+  # Definitions for DCMTK 3.6.1
+  macro(DCMTK_UNSET)
+  endmacro()
+
+  set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/)
+  # End
+
+
   DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}")
 
   IF (CMAKE_CROSSCOMPILING)
     SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.")
   ENDIF()
-  SET(DCMTK_SOURCE_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.0)
+  SET(DCMTK_SOURCE_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.1)
   include(${DCMTK_SOURCES_DIR}/CMake/CheckFunctionWithHeaderExists.cmake)
   include(${DCMTK_SOURCES_DIR}/CMake/GenerateDCMTKConfigure.cmake)
 
@@ -47,7 +55,7 @@
     set(HAVE_PROTOTYPE_GETSOCKNAME 1)
   endif()
 
-  set(DCMTK_PACKAGE_VERSION "3.6.0")
+  set(DCMTK_PACKAGE_VERSION "3.6.1")
   set(DCMTK_PACKAGE_VERSION_SUFFIX "")
   set(DCMTK_PACKAGE_VERSION_NUMBER 360)
 
@@ -106,45 +114,10 @@
       ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc
       )
     
-    execute_process(
-      COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-linux-speed.patch
-      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-      RESULT_VARIABLE Failure
-      )
-
-    if (Failure AND FirstRun)
-      message(FATAL_ERROR "Error while patching a file")
-    endif()
-
   elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
     list(REMOVE_ITEM DCMTK_SOURCES 
       ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc
       )
-
-    if (CMAKE_COMPILER_IS_GNUCXX)
-      # This is a patch for MinGW64
-      execute_process(
-        COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-mingw64.patch
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-        RESULT_VARIABLE Failure
-        )
-
-      if (Failure AND FirstRun)
-        message(FATAL_ERROR "Error while patching a file")
-      endif()
-    endif()
-
-    # This patch improves speed, even for Windows
-    execute_process(
-      COMMAND ${PATCH_EXECUTABLE} -p0 -N 
-      INPUT_FILE ${ORTHANC_ROOT}/Resources/Patches/dcmtk-linux-speed.patch
-      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-      RESULT_VARIABLE Failure
-      )
-
-    if (Failure AND FirstRun)
-      message(FATAL_ERROR "Error while patching a file")
-    endif()
   endif()
 
   list(REMOVE_ITEM DCMTK_SOURCES 
@@ -155,7 +128,7 @@
 
   #set_source_files_properties(${DCMTK_SOURCES}
   #  PROPERTIES COMPILE_DEFINITIONS
-  #  "PACKAGE_VERSION=\"3.6.0\";PACKAGE_VERSION_NUMBER=\"360\"")
+  #  "PACKAGE_VERSION=\"3.6.1\";PACKAGE_VERSION_NUMBER=\"360\"")
 
   # This fixes crashes related to the destruction of the DCMTK OFLogger
   # http://support.dcmtk.org/docs-snapshot/file_macros.html