comparison 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
comparison
equal deleted inserted replaced
1646:da799f767e5d 1647:fe458dde986e
48 48
49 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR 49 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
50 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR 50 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
51 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") 51 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
52 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") 52 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
53 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") 53 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--version-script=${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/VersionScript.map")
54 54
55 # Remove the "-rdynamic" option 55 # Remove the "-rdynamic" option
56 # http://www.mail-archive.com/cmake@cmake.org/msg08837.html 56 # http://www.mail-archive.com/cmake@cmake.org/msg08837.html
57 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") 57 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
58 link_libraries(uuid pthread rt) 58 link_libraries(uuid pthread rt)
106 add_definitions(-DHAVE_WIN_PTHREAD=0) 106 add_definitions(-DHAVE_WIN_PTHREAD=0)
107 endif() 107 endif()
108 endif() 108 endif()
109 109
110 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 110 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
111 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -exported_symbols_list ${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/ExportedSymbols.list")
112
111 add_definitions( 113 add_definitions(
112 -D_XOPEN_SOURCE=1 114 -D_XOPEN_SOURCE=1
113 ) 115 )
114 link_libraries(iconv) 116 link_libraries(iconv)
115 117