diff OrthancFramework/Resources/CMake/Compiler.cmake @ 5478:2948c694352e

LSB on Debian 12: removed "--lsb-besteffort" and "-Wl,--no-undefined"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Dec 2023 16:38:11 +0100
parents 035ebc5b227c
children dc8e5c65be99
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/Compiler.cmake	Wed Dec 20 14:44:09 2023 +0100
+++ b/OrthancFramework/Resources/CMake/Compiler.cmake	Wed Dec 20 16:38:11 2023 +0100
@@ -124,12 +124,15 @@
     ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
     ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
 
-  if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND
+  if (NOT ${CMAKE_SYSTEM_VERSION} STREQUAL "LinuxStandardBase" AND
+      NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND
       NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
     # The "--no-undefined" linker flag makes the shared libraries
     # (plugins ModalityWorklists and ServeFolders) fail to compile on
     # OpenBSD, and make the PostgreSQL plugin complain about missing
-    # "environ" global variable in FreeBSD
+    # "environ" global variable in FreeBSD. Furthermore, on Linux
+    # Standard Base running on Debian 12, the "-Wl,--no-undefined"
+    # breaks the compilation (added after Orthanc 1.12.2).
     set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
   endif()