Mercurial > hg > orthanc
diff Resources/CMake/DcmtkConfigurationStatic-3.6.2.cmake @ 3593:0301f59450fe
improved the patch for loading DICOM dictionary from memory
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Jan 2020 17:58:15 +0100 |
parents | 4b1017928fc4 |
children | 0654d0838de8 |
line wrap: on
line diff
--- a/Resources/CMake/DcmtkConfigurationStatic-3.6.2.cmake Mon Dec 23 15:46:50 2019 +0100 +++ b/Resources/CMake/DcmtkConfigurationStatic-3.6.2.cmake Mon Jan 06 17:58:15 2020 +0100 @@ -31,7 +31,7 @@ message("Applying patch to detect mathematic primitives in DCMTK 3.6.2 with C++11") execute_process( COMMAND ${PATCH_EXECUTABLE} -p0 -N -i - ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.2-cmath.patch + ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.2.patch WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE Failure ) @@ -39,6 +39,11 @@ if (Failure) message(FATAL_ERROR "Error while patching a file") endif() + + configure_file( + ${ORTHANC_ROOT}/Resources/Patches/dcmtk-dcdict_orthanc.cc + ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict_orthanc.cc + COPYONLY) else() message("The patches for DCMTK have already been applied") endif() @@ -72,18 +77,21 @@ SET(DCMTK_ENABLE_CHARSET_CONVERSION "iconv" CACHE STRING "") SET(HAVE_SYS_GETTID 0 CACHE INTERNAL "") - execute_process( - COMMAND ${PATCH_EXECUTABLE} -p0 -N -i - ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.2-linux-standard-base.patch - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - RESULT_VARIABLE Failure - ) + if (FirstRun) + execute_process( + COMMAND ${PATCH_EXECUTABLE} -p0 -N -i + ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.2-linux-standard-base.patch + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE Failure + ) - if (FirstRun AND Failure) - message(FATAL_ERROR "Error while patching a file") + if (Failure) + message(FATAL_ERROR "Error while patching a file") + endif() endif() endif() + SET(DCMTK_SOURCE_DIR ${DCMTK_SOURCES_DIR}) include(${DCMTK_SOURCES_DIR}/CMake/CheckFunctionWithHeaderExists.cmake) include(${DCMTK_SOURCES_DIR}/CMake/GenerateDCMTKConfigure.cmake) @@ -163,19 +171,6 @@ endif() -if (ORTHANC_SANDBOXED) - configure_file( - ${ORTHANC_ROOT}/Resources/WebAssembly/dcdict.h - ${DCMTK_SOURCES_DIR}/dcmdata/include/dcmtk/dcmdata/dcdict.h - COPYONLY) - - configure_file( - ${ORTHANC_ROOT}/Resources/WebAssembly/dcdict.cc - ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict.cc - COPYONLY) -endif() - - #set_source_files_properties(${DCMTK_SOURCES} # PROPERTIES COMPILE_DEFINITIONS # "PACKAGE_VERSION=\"${DCMTK_PACKAGE_VERSION}\";PACKAGE_VERSION_NUMBER=\"${DCMTK_VERSION_NUMBER}\"")