changeset 2522:ce2dfba9417c

fix build with dcmtk 3.6.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 10 Apr 2018 06:57:42 +0200
parents 6db878376018
children 21e2ed283cd5
files Core/DicomParsing/FromDcmtkBridge.cpp Resources/CMake/DcmtkConfiguration.cmake
diffstat 2 files changed, 12 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomParsing/FromDcmtkBridge.cpp	Mon Apr 09 17:59:16 2018 +0200
+++ b/Core/DicomParsing/FromDcmtkBridge.cpp	Tue Apr 10 06:57:42 2018 +0200
@@ -2182,7 +2182,7 @@
         case ITagVisitor::Action_Replace:
         {
           std::string s = Toolbox::ConvertFromUtf8(newValue, encoding);
-          if (element.putString(s.c_str(), s.size()) != EC_Normal)
+          if (element.putString(s.c_str()) != EC_Normal)
           {
             LOG(ERROR) << "Cannot replace value of tag: " << tag.Format();
             throw OrthancException(ErrorCode_InternalError);
--- a/Resources/CMake/DcmtkConfiguration.cmake	Mon Apr 09 17:59:16 2018 +0200
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Tue Apr 10 06:57:42 2018 +0200
@@ -293,23 +293,17 @@
   endif()
 
 
-  if (USE_DCMTK_360)
-    # Removing this file is required with DCMTK 3.6.0
-    list(REMOVE_ITEM DCMTK_SOURCES 
-      
-      )
-  else()
-    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()
+  if (NOT USE_DCMTK_360 AND
+      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()