diff OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake @ 4427:30efda56500d

trying to enable TLS support in DCMTK
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 31 Dec 2020 15:16:18 +0100
parents 1657c8700974
children a9a596ed988d
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake	Wed Dec 30 09:39:40 2020 +0100
+++ b/OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake	Thu Dec 31 15:16:18 2020 +0100
@@ -131,6 +131,21 @@
     endif()
   endif()
 
+
+  # New in Orthanc 1.9.0 for DICOM TLS
+  if (ENABLE_SSL)
+    # Must be the last command to add files to ${DCMTK_SOURCES},
+    # because of "PROPERTIES COMPILE_DEFINITIONS"
+    AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmtls/libsrc DCMTK_SOURCES)
+    include_directories(
+      ${DCMTK_SOURCES_DIR}/dcmtls/include
+      )
+    # The function "SSL_CTX_get0_param()" is available on OpenSSL
+    # 1.1.x that is used for static builds => TODO autodetect
+    set_source_files_properties(${DCMTK_SOURCES}
+      PROPERTIES COMPILE_DEFINITIONS "WITH_OPENSSL;HAVE_SSL_CTX_GET0_PARAM")
+  endif()
+  
   
   # This fixes crashes related to the destruction of the DCMTK OFLogger
   # http://support.dcmtk.org/docs-snapshot/file_macros.html