Unfortunately, I get an error:
Code: Select all
-- Info: STL tuple support enabled
-- Info: STL system_error support enabled
CMake Error at dcmtk/dcmtls/libsrc/CMakeLists.txt:13 (set_property):
set_property could not find TARGET dcmtls. Perhaps it has not yet been
created.
CMake Error at dcmtk/dcmnet/libsrc/CMakeLists.txt:49 (set_property):
set_property could not find TARGET dcmnet. Perhaps it has not yet been
created.
-- Looking for CMake command CONFIGURE_PACKAGE_CONFIG_FILE
-- Looking for CMake command CONFIGURE_PACKAGE_CONFIG_FILE - found
Code: Select all
a1615b246fe5837c82221052312b3eb17fb30f22 is the first bad commit
commit a1615b246fe5837c82221052312b3eb17fb30f22
Author: Jan Schlamelcher <dicom@offis.de>
Date: Thu Mar 25 17:52:23 2021 +0100
Introduced CMake variable DCMTK_TLS_LIBRARY_POSTFIX.
Introduced a new advanced CMake cache variable DCMTK_TLS_LIBRARY_POSTFIX that
allows adding a custom postfix to all file names of all libraries that change
their ABI when linking against OpenSSL.
Please note that this suffix is not enabled by default and must be set to an
appropriate string in addition to enabling DCMTK_WITH_OPENSSL if you plan to
mix TLS enabled with non TLS enabled DCMTK builds.
This closes DCMTK issue #879.
Code: Select all
cmake_minimum_required(VERSION 3.8)
Project(dcmtk)
# Configure locations and naming of generated files
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "" FORCE)
set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "" FORCE)
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "" FORCE)
# Build only debug and release
set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "" FORCE)
# Enable multi-core builds
add_compile_options(/MP)
# Enable debug symbols output
add_compile_options(/Zi)
# Enable PDB also in release
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
# Remove unreferenced functions & data (https://docs.microsoft.com/en-us/cpp/build/reference/opt-optimizations)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:REF /INCREMENTAL:no")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:REF /INCREMENTAL:no")
# Workaround for compiling with openssl
add_definitions(-DHAVE_SSL_CTX_GET0_PARAM)
set(DCMTK_MODULES ofstd oflog dcmdata dcmimgle dcmjpeg dcmjpls dcmimage dcmtls dcmnet dcmsr dcmiod CACHE STRING "List of modules that should be built." FORCE)
set(ICU_ROOT "${CMAKE_SOURCE_DIR}/support_libraries/icu4c")
set(OPENSSL_USE_STATIC_LIBS TRUE)
set(OPENSSL_MSVC_STATIC_RT TRUE)
set(OPENSSL_ROOT_DIR "${CMAKE_SOURCE_DIR}/support_libraries/openssl")
set(WITH_OPENSSLINC "${CMAKE_SOURCE_DIR}/support_libraries/openssl")
option(BUILD_APPS "Build command line applications and test programs." OFF)
option(BUILD_SHARED_LIBS "Build with shared libraries." ON)
option(BUILD_SINGLE_SHARED_LIBRARY "Build a single DCMTK library." ON)
option(DCMTK_WITH_TIFF "Configure DCMTK with support for TIFF." OFF)
option(DCMTK_WITH_PNG "Configure DCMTK with support for PNG." OFF)
option(DCMTK_WITH_XML "Configure DCMTK with support for XML." OFF)
option(DCMTK_WITH_ZLIB "Configure DCMTK with support for ZLIB." OFF)
option(DCMTK_WITH_OPENSSL "Configure DCMTK with support for OPENSSL." ON)
option(DCMTK_WITH_SNDFILE "Configure DCMTK with support for SNDFILE." OFF)
option(DCMTK_WITH_ICONV "Configure DCMTK with support for ICONV." OFF)
option(DCMTK_WITH_ICU "Configure DCMTK with support for ICU." ON)
option(DCMTK_WITH_OPENJPEG "Configure DCMTK with support for OPENJPEG." OFF)
option(DCMTK_ENABLE_PRIVATE_TAGS "Configure DCMTK with support for DICOM private tags coming with DCMTK." OFF)
option(DCMTK_WITH_THREADS "Configure DCMTK with support for multi-threading." ON)
option(DCMTK_WITH_DOXYGEN "Build API documentation with DOXYGEN." OFF)
option(DCMTK_GENERATE_DOXYGEN_TAGFILE "Generate a tag file with DOXYGEN." OFF)
option(DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS "Build with wide char file I/O functions." ON)
option(DCMTK_WIDE_CHAR_MAIN_FUNCTION "Build command line tools with wide char main function." ON)
option(DCMTK_ENABLE_STL "Enable use of native STL classes and algorithms instead of DCMTK's own implementations." ON)
add_subdirectory(dcmtk-next)