Skip to content

Commit

Permalink
COMP: Enable OpenSSL for DCMTK
Browse files Browse the repository at this point in the history
  • Loading branch information
jadh4v committed Dec 18, 2024
1 parent 6cf5f8f commit ea17293
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ set(Slicer_DEPENDENCIES
)

set(CURL_ENABLE_SSL ${Slicer_USE_PYTHONQT_WITH_OPENSSL})
set(DCMTK_ENABLE_SSL ${Slicer_USE_PYTHONQT_WITH_OPENSSL})

if(Slicer_USE_SimpleITK)
list(APPEND Slicer_DEPENDENCIES SimpleITK)
Expand Down
28 changes: 27 additions & 1 deletion SuperBuild/External_DCMTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ set(proj DCMTK)

# Set dependency list
set(${proj}_DEPENDENCIES "zlib")
if(DCMTK_ENABLE_SSL)
if(NOT Slicer_USE_SYSTEM_${proj})
list(APPEND ${proj}_DEPENDENCIES OpenSSL)
else()
# XXX - Add a test checking if system DCMTK supports OpenSSL
endif()
endif()

# Include dependent projects if any
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)
Expand All @@ -20,6 +27,25 @@ endif()
if(NOT DEFINED DCMTK_DIR AND NOT Slicer_USE_SYSTEM_${proj})
set(EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS)

if(DCMTK_ENABLE_SSL)
list(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS
-DOPENSSL_INCLUDE_DIR:PATH=${OPENSSL_INCLUDE_DIR}
)
if(UNIX)
list(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS
-DOPENSSL_SSL_LIBRARY:STRING=${OPENSSL_SSL_LIBRARY}
-DOPENSSL_CRYPTO_LIBRARY:STRING=${OPENSSL_CRYPTO_LIBRARY}
)
elseif(WIN32)
list(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS
-DLIB_EAY_DEBUG:FILEPATH=${LIB_EAY_DEBUG}
-DLIB_EAY_RELEASE:FILEPATH=${LIB_EAY_RELEASE}
-DSSL_EAY_DEBUG:FILEPATH=${SSL_EAY_DEBUG}
-DSSL_EAY_RELEASE:FILEPATH=${SSL_EAY_RELEASE}
)
endif()
endif()

if(CTEST_USE_LAUNCHERS)
set(EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS
-DCMAKE_PROJECT_DCMTK_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake
Expand Down Expand Up @@ -65,7 +91,7 @@ if(NOT DEFINED DCMTK_DIR AND NOT Slicer_USE_SYSTEM_${proj})
-DBUILD_SHARED_LIBS:BOOL=ON
-DDCMTK_WITH_DOXYGEN:BOOL=OFF
-DDCMTK_WITH_ZLIB:BOOL=OFF # see CTK github issue #25
-DDCMTK_WITH_OPENSSL:BOOL=OFF # see CTK github issue #25
-DDCMTK_WITH_OPENSSL:BOOL=${DCMTK_ENABLE_SSL} # see CTK github issue #25
-DDCMTK_WITH_PNG:BOOL=OFF # see CTK github issue #25
-DDCMTK_WITH_TIFF:BOOL=OFF # see CTK github issue #25
-DDCMTK_WITH_XML:BOOL=OFF # see CTK github issue #25
Expand Down

0 comments on commit ea17293

Please sign in to comment.