Mercurial > hg > orthanc
changeset 5483:e7a04f878704
fix build of Orthanc Framework shared library on LSB
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Dec 2023 10:29:07 +0100 |
parents | dc8e5c65be99 |
children | 723251b2b71e |
files | OrthancFramework/Resources/CMake/Compiler.cmake |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/Compiler.cmake Wed Dec 20 18:59:08 2023 +0100 +++ b/OrthancFramework/Resources/CMake/Compiler.cmake Fri Dec 22 10:29:07 2023 +0100 @@ -43,6 +43,13 @@ # use by "ExternalProject" in CMake SET(CMAKE_LSB_CC $ENV{LSB_CC} CACHE STRING "") SET(CMAKE_LSB_CXX $ENV{LSB_CXX} CACHE STRING "") + + # This is necessary to build "Orthanc mainline - Framework LSB + # Release" on "buildbot-worker-debian11" + set(LSB_PTHREAD_NONSHARED "${LSB_PATH}/lib64-${LSB_TARGET_VERSION}/libpthread_nonshared.a") + if (EXISTS ${LSB_PTHREAD_NONSHARED}) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LSB_PTHREAD_NONSHARED}") + endif() endif() @@ -130,9 +137,11 @@ # 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. Furthermore, on Linux - # Standard Base running on Debian 12, the "-Wl,--no-undefined" - # breaks the compilation (added after Orthanc 1.12.2). + # "environ" global variable in FreeBSD. + # + # TODO - Furthermore, on Linux Standard Base running on Debian 12, + # the "-Wl,--no-undefined" seems to break the compilation (added + # after Orthanc 1.12.2). This is disabled for now. 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()