# HG changeset patch # User Sebastien Jodogne # Date 1584514653 -3600 # Node ID df164cc69529d8b82023329adf5b36b6a2a36c96 # Parent 74889e6f6d6805ef6f2d159c7acd903ef682e94f fix compatibility between MSVC and Windows XP diff -r 74889e6f6d68 -r df164cc69529 Resources/CMake/DcmtkConfigurationStatic-3.6.5.cmake --- a/Resources/CMake/DcmtkConfigurationStatic-3.6.5.cmake Tue Mar 17 19:19:48 2020 +0100 +++ b/Resources/CMake/DcmtkConfigurationStatic-3.6.5.cmake Wed Mar 18 07:57:33 2020 +0100 @@ -185,11 +185,18 @@ ) -if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND - CMAKE_COMPILER_IS_GNUCXX) - # This is MinGW +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + # For compatibility with Windows XP, avoid using fiber-local-storage + # in log4cplus, but use thread-local-storage instead. Otherwise, + # Windows XP complains about missing "FlsGetValue()" in KERNEL32.dll add_definitions( -DDCMTK_LOG4CPLUS_AVOID_WIN32_FLS - -DDCMTK_LOG4CPLUS_SINGLE_THREADED ) + + if (CMAKE_COMPILER_IS_GNUCXX) + # This is MinGW + add_definitions( + -DDCMTK_LOG4CPLUS_SINGLE_THREADED + ) + endif() endif()