Mercurial > hg > orthanc
diff Resources/CMake/Compiler.cmake @ 1647:fe458dde986e
hide symbols in plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Sep 2015 11:02:26 +0200 |
parents | 307b9ea6c39b |
children | 8040d56cb0b3 |
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake Thu Sep 24 16:01:09 2015 +0200 +++ b/Resources/CMake/Compiler.cmake Fri Sep 25 11:02:26 2015 +0200 @@ -50,7 +50,7 @@ ${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") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--version-script=${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/VersionScript.map") # Remove the "-rdynamic" option # http://www.mail-archive.com/cmake@cmake.org/msg08837.html @@ -108,6 +108,8 @@ endif() elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -exported_symbols_list ${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/ExportedSymbols.list") + add_definitions( -D_XOPEN_SOURCE=1 )