# HG changeset patch # User Sebastien Jodogne # Date 1451914026 -3600 # Node ID f395dddfbf1683bfead05f4acf914ca71e0e3753 # Parent 6e9e06fd0e6fc0f903901715e9766d10baf8fe01 sync diff -r 6e9e06fd0e6f -r f395dddfbf16 Orthanc/Resources/CMake/Compiler.cmake --- a/Orthanc/Resources/CMake/Compiler.cmake Mon Jan 04 13:47:52 2016 +0100 +++ b/Orthanc/Resources/CMake/Compiler.cmake Mon Jan 04 14:27:06 2016 +0100 @@ -50,7 +50,12 @@ ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--version-script=${ORTHANC_ROOT}/Plugins/Samples/Common/VersionScript.map") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") + + if (NOT DEFINED ENABLE_PLUGINS_VERSION_SCRIPT OR + ENABLE_PLUGINS_VERSION_SCRIPT) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${ORTHANC_ROOT}/Plugins/Samples/Common/VersionScript.map") + endif() # Remove the "-rdynamic" option # http://www.mail-archive.com/cmake@cmake.org/msg08837.html