After some more testing, I see that the problem is with the dcmtk 3.6.3 snapshots.
Running Cmake on the sources from dcmtk-3.6.2_snapshot-e0b0223.tar.gz dated 02/11/2017 works OK, but using either the latest dcmtk-3.6.3_snapshot-e27f8cb.tar.gz dated 12/10/2018, or the older, dcmtk-3.6.3_snapshot-5926741.tar.gz dated 05/06/2018 produce the 'DCMTK OPENSSL support will be disabled' message.
I have tried with both Xcode v9.4.1 and v10, and Cmake 3.9.5 and 3.12.3.
The problem comes from changes related to Open SSL support in the 3rdparty.cmake file between the dcmtk 3.6.2 and 3.6.3 sources.
From 3rdparty.cmake in dcmtk 3.6.2
Code: Select all
IF(DCMTK_WITH_OPENSSL)
FIND_PACKAGE(OpenSSL QUIET)
IF(NOT OPENSSL_FOUND)
MESSAGE(STATUS "Warning: OPENSSL support will be disabled because openssl was not found.")
SET(WITH_OPENSSL "")
SET(DCMTK_WITH_OPENSSL OFF CACHE BOOL "" FORCE)
ELSE(NOT OPENSSL_FOUND)
MESSAGE(STATUS "Info: DCMTK OPENSSL support will be enabled")
SET(WITH_OPENSSL 1)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
SET(OPENSSL_LIBS ${OPENSSL_LIBRARIES})
ENDIF(NOT OPENSSL_FOUND)
ENDIF(DCMTK_WITH_OPENSSL)
From 3rdparty.cmake in dcmtk 3.6.3
Code: Select all
if(DCMTK_WITH_OPENSSL)
find_package(OpenSSL QUIET)
if(NOT OPENSSL_FOUND)
message(STATUS "Warning: OPENSSL support will be disabled because openssl was not found.")
set(WITH_OPENSSL "")
set(DCMTK_WITH_OPENSSL OFF CACHE BOOL "" FORCE)
else()
include(CheckLibraryExists)
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("extern \"C\" {\n#include <openssl/ssl.h>\n}\nint main(){\n#if OPENSSL_VERSION_NUMBER < 0x10001000L\n#error OpenSSL too old\n#endif\n}\n" OPENSSL_VERSION_CHECK)
if(OPENSSL_VERSION_CHECK)
message(STATUS "Info: DCMTK OPENSSL support will be enabled")
set(WITH_OPENSSL 1)
include_directories(${OPENSSL_INCLUDE_DIR})
set(OPENSSL_LIBS ${OPENSSL_LIBRARIES})
CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
if(HAVE_LIBDL)
set(OPENSSL_LIBS ${OPENSSL_LIBS} dl)
endif()
else()
message(STATUS "Info: DCMTK OPENSSL support will be disabled: DCMTK requires OpenSSL version 1.0.1 or newer")
set(DCMTK_WITH_OPENSSL OFF CACHE BOOL "" FORCE)
set(WITH_OPENSSL "")
endif()
endif()
endif()
I also noticed that the dcmtk 3.6.3 sources have the same problem with iconv support.
- Christos Konidaris