From 8bbf4c3be9ba6589dc0f7e5bf072cf68a57107b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 3 Jan 2017 15:56:55 +0100 Subject: [build] add -fvisibility=hidden to macOS dynamic framework and export required symbols --- platform/macos/config.cmake | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'platform/macos/config.cmake') diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake index dab507d42a..2e4b7a01b2 100644 --- a/platform/macos/config.cmake +++ b/platform/macos/config.cmake @@ -9,8 +9,6 @@ mason_use(icu VERSION 58.1) include(cmake/loop-darwin.cmake) macro(mbgl_platform_core) - set_xcode_property(mbgl-core GCC_SYMBOLS_PRIVATE_EXTERN YES) - target_sources(mbgl-core # File source PRIVATE platform/darwin/src/http_file_source.mm @@ -62,6 +60,7 @@ macro(mbgl_platform_core) target_compile_options(mbgl-core PRIVATE -fobjc-arc + PRIVATE -fvisibility=hidden ) target_include_directories(mbgl-core @@ -85,8 +84,6 @@ endmacro() macro(mbgl_platform_render) - set_xcode_property(mbgl-render GCC_SYMBOLS_PRIVATE_EXTERN YES) - target_link_libraries(mbgl-render PRIVATE mbgl-loop PRIVATE "-framework Foundation" @@ -100,8 +97,6 @@ endmacro() macro(mbgl_platform_offline) - set_xcode_property(mbgl-offline GCC_SYMBOLS_PRIVATE_EXTERN YES) - target_link_libraries(mbgl-offline PRIVATE mbgl-loop PRIVATE "-framework Foundation" @@ -115,8 +110,6 @@ endmacro() macro(mbgl_platform_test) - set_xcode_property(mbgl-test GCC_SYMBOLS_PRIVATE_EXTERN YES) - target_sources(mbgl-test PRIVATE test/src/main.cpp ) @@ -127,6 +120,10 @@ macro(mbgl_platform_test) COMPILE_FLAGS -DWORK_DIRECTORY="${CMAKE_SOURCE_DIR}" ) + target_compile_options(mbgl-test + PRIVATE -fvisibility=hidden + ) + target_link_libraries(mbgl-test PRIVATE mbgl-loop PRIVATE "-framework Foundation" @@ -139,7 +136,9 @@ macro(mbgl_platform_test) endmacro() macro(mbgl_platform_benchmark) - set_xcode_property(mbgl-benchmark GCC_SYMBOLS_PRIVATE_EXTERN YES) + target_compile_options(mbgl-benchmark + PRIVATE -fvisibility=hidden + ) target_sources(mbgl-benchmark PRIVATE benchmark/src/main.cpp @@ -163,7 +162,9 @@ macro(mbgl_platform_benchmark) endmacro() macro(mbgl_platform_node) - set_xcode_property(mbgl-node GCC_SYMBOLS_PRIVATE_EXTERN YES) + target_compile_options(mbgl-node + PRIVATE -fvisibility=hidden + ) target_link_libraries(mbgl-node PRIVATE "-framework Foundation" -- cgit v1.2.1