From 1ed8ead451e28438ff1bc9d09c4b91fcba81e8c2 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 13 Mar 2024 14:27:03 -0400 Subject: [PATCH] ENH: Enable DCMTK_ENABLE_BUILTIN_OFICONV_DATA by default As suggested by Michael Onken > By default, the oficonv library makes use of character set conversion tables that are loaded from files during runtime. In order to pre-compile those tables into the oficonv library, you can set the CMake option DCMTK_ENABLE_BUILTIN_OFICONV_DATA (ON). --- Modules/ThirdParty/DCMTK/CMakeLists.txt | 1 + Modules/ThirdParty/DCMTK/itk-module-init.cmake | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Modules/ThirdParty/DCMTK/CMakeLists.txt b/Modules/ThirdParty/DCMTK/CMakeLists.txt index dd868017b52..5aaf18f2ebf 100644 --- a/Modules/ThirdParty/DCMTK/CMakeLists.txt +++ b/Modules/ThirdParty/DCMTK/CMakeLists.txt @@ -327,6 +327,7 @@ endforeach() -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_LIBDIR:PATH=${CMAKE_INSTALL_LIBDIR} -DCMAKE_INSTALL_BINDIR:PATH=${CMAKE_INSTALL_BINDIR} + -DDCMTK_ENABLE_BUILTIN_OFICONV_DATA:BOOL=${DCMTK_ENABLE_BUILTIN_OFICONV_DATA} ${CHARSET_CONVERSION_ARGS} DEPENDS ${JPEG_DEPENDENCY} ${PNG_DEPENDENCY} ${TIFF_DEPENDENCY} ${ICU_DEPENDENCY} BUILD_BYPRODUCTS ${DCMTK_BYPRODUCTS} diff --git a/Modules/ThirdParty/DCMTK/itk-module-init.cmake b/Modules/ThirdParty/DCMTK/itk-module-init.cmake index 941f06d98e7..fcfe495ba1e 100644 --- a/Modules/ThirdParty/DCMTK/itk-module-init.cmake +++ b/Modules/ThirdParty/DCMTK/itk-module-init.cmake @@ -26,6 +26,8 @@ if(ITK_USE_SYSTEM_DCMTK) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/CMake") find_package(DCMTK REQUIRED NO_MODULE) else(ITK_USE_SYSTEM_DCMTK) + # Change default from OFF to ON for portability. + option(DCMTK_ENABLE_BUILTIN_OFICONV_DATA "Embed oficonv data files into oficonv library" ON) # Copied and mofified from DCMTK/CMake/3rdparty.cmake if(NOT DEFINED DCMTK_USE_ICU) include(CheckCXXSourceCompiles)