Mercurial > hg > orthanc
changeset 1886:fb6dd1570d4d dcmtk-3.6.1
integration mainline->dcmtk-3.6.1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 Dec 2015 15:43:57 +0100 |
parents | 7bef560b9782 (diff) 5be57564ffc4 (current diff) |
children | ecf8b8ebfb52 |
files | |
diffstat | 6 files changed, 55 insertions(+), 89 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake Fri Dec 11 15:43:33 2015 +0100 +++ b/Resources/CMake/Compiler.cmake Fri Dec 11 15:43:57 2015 +0100 @@ -42,7 +42,6 @@ -D_CRT_SECURE_NO_DEPRECATE=1 ) include_directories(${ORTHANC_ROOT}/Resources/ThirdParty/VisualStudio) - link_libraries(netapi32) endif() @@ -69,6 +68,8 @@ endif() elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + link_libraries(netapi32) + if (MSVC) message("MSVC compiler version = " ${MSVC_VERSION} "\n") # Starting Visual Studio 2013 (version 1800), it is not possible
--- a/Resources/CMake/DcmtkConfiguration.cmake Fri Dec 11 15:43:33 2015 +0100 +++ b/Resources/CMake/DcmtkConfiguration.cmake Fri Dec 11 15:43:57 2015 +0100 @@ -1,9 +1,9 @@ if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK) - SET(DCMTK_VERSION_NUMBER 360) - SET(DCMTK_PACKAGE_VERSION "3.6.0") - 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_PACKAGE_VERSION "3.6.1") + SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.1_20150924) + SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.1_20150924.tar.gz") + SET(DCMTK_MD5 "0d60ea9e1c886124fe45122855cecd30") if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") set(FirstRun OFF) @@ -11,6 +11,15 @@ set(FirstRun ON) endif() + # Definitions for DCMTK 3.6.1 + macro(DCMTK_UNSET) + endmacro() + + set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) + add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1) + # End + + DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}") IF (CMAKE_CROSSCOMPILING) @@ -40,6 +49,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) @@ -87,55 +108,22 @@ ${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 ) - 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/clfsap.cc ${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 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc - ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdictbi.cc + #${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdictbi.cc ) #set_source_files_properties(${DCMTK_SOURCES}
--- a/Resources/Patches/dcmtk-linux-speed.patch Fri Dec 11 15:43:33 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -diff -urEb dcmtk-3.6.0.orig/dcmnet/libsrc/dul.cc dcmtk-3.6.0/dcmnet/libsrc/dul.cc ---- dcmtk-3.6.0.orig/dcmnet/libsrc/dul.cc 2010-12-01 09:26:36.000000000 +0100 -+++ dcmtk-3.6.0/dcmnet/libsrc/dul.cc 2015-05-15 17:03:50.762451757 +0200 -@@ -1840,7 +1840,7 @@ - } - #endif - #endif -- setTCPBufferLength(sock); -+ //setTCPBufferLength(sock); - - #ifndef DONT_DISABLE_NAGLE_ALGORITHM - /* -diff -urEb dcmtk-3.6.0.orig/dcmnet/libsrc/dulfsm.cc dcmtk-3.6.0/dcmnet/libsrc/dulfsm.cc ---- dcmtk-3.6.0.orig/dcmnet/libsrc/dulfsm.cc 2010-12-01 09:26:36.000000000 +0100 -+++ dcmtk-3.6.0/dcmnet/libsrc/dulfsm.cc 2015-05-15 17:03:55.570451952 +0200 -@@ -2417,7 +2417,7 @@ - return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); - } - #endif -- setTCPBufferLength(s); -+ //setTCPBufferLength(s); - - #ifndef DONT_DISABLE_NAGLE_ALGORITHM - /*
--- a/Resources/Patches/dcmtk-mingw64.patch Fri Dec 11 15:43:33 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -diff -urEb dcmtk-3.6.0.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.0/ofstd/include/dcmtk/ofstd/offile.h ---- dcmtk-3.6.0.orig/ofstd/include/dcmtk/ofstd/offile.h 2010-12-17 11:50:30.000000000 +0100 -+++ dcmtk-3.6.0/ofstd/include/dcmtk/ofstd/offile.h 2013-07-19 15:56:25.688996134 +0200 -@@ -196,7 +196,7 @@ - OFBool popen(const char *command, const char *modes) - { - if (file_) fclose(); --#ifdef _WIN32 -+#if 0 - file_ = _popen(command, modes); - #else - file_ = :: popen(command, modes); -@@ -258,7 +258,7 @@ - { - if (popened_) - { --#ifdef _WIN32 -+#if 0 - result = _pclose(file_); - #else - result = :: pclose(file_); -Only in dcmtk-3.6.0/ofstd/include/dcmtk/ofstd: offile.h~
--- a/Resources/Patches/dcmtk-mingw64.txt Fri Dec 11 15:43:33 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -diff -urEb dcmtk-3.6.0.orig/ dcmtk-3.6.0 > ../Resources/Patches/dcmtk-mingw64.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Resources/Patches/dcmtk-speed.patch Fri Dec 11 15:43:57 2015 +0100 @@ -0,0 +1,24 @@ +diff -Naur dcmtk-3.6.1_20150924.orig/dcmnet/libsrc/dul.cc dcmtk-3.6.1_20150924/dcmnet/libsrc/dul.cc +--- dcmtk-3.6.1_20150924.orig/dcmnet/libsrc/dul.cc 2015-12-02 09:56:30.845194735 +0100 ++++ dcmtk-3.6.1_20150924/dcmnet/libsrc/dul.cc 2015-12-02 09:56:49.925194253 +0100 +@@ -1833,7 +1833,7 @@ + return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); + } + #endif +- setTCPBufferLength(sock); ++ //setTCPBufferLength(sock); + + #ifndef DONT_DISABLE_NAGLE_ALGORITHM + /* +diff -Naur dcmtk-3.6.1_20150924.orig/dcmnet/libsrc/dulfsm.cc dcmtk-3.6.1_20150924/dcmnet/libsrc/dulfsm.cc +--- dcmtk-3.6.1_20150924.orig/dcmnet/libsrc/dulfsm.cc 2015-12-02 09:56:30.845194735 +0100 ++++ dcmtk-3.6.1_20150924/dcmnet/libsrc/dulfsm.cc 2015-12-02 09:57:03.709193904 +0100 +@@ -2421,7 +2421,7 @@ + return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); + } + #endif +- setTCPBufferLength(s); ++ //setTCPBufferLength(s); + + #ifndef DONT_DISABLE_NAGLE_ALGORITHM + /*