changeset 5491:42e6593aa78e

fix for Stone
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jan 2024 07:21:50 +0100
parents 2742be05c0bc
children 4b3f5986eca1
files OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.8.cmake
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.8.cmake	Tue Jan 09 21:20:22 2024 +0100
+++ b/OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.8.cmake	Wed Jan 10 07:21:50 2024 +0100
@@ -188,12 +188,13 @@
 
 
 # "DCMTK_ENABLE_CHARSET_CONVERSION" is defined by "osconfig.h.in"
-if (BOOST_LOCALE_BACKEND STREQUAL "gcc")
-  set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV")
+if (NOT DEFINED BOOST_LOCALE_BACKEND OR   # This is the case if locale support is disabled (e.g. in Stone)
+    BOOST_LOCALE_BACKEND STREQUAL "gcc")
+  set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV" CACHE STRING "" FORCE)
 elseif (BOOST_LOCALE_BACKEND STREQUAL "libiconv")
-  set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_ICONV")
+  set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_ICONV" CACHE STRING "" FORCE)
 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu")
-  set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_ICU")
+  set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_ICU" CACHE STRING "" FORCE)
 else()
   message(FATAL_ERROR "Invalid value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}")
 endif()