summaryrefslogtreecommitdiff
path: root/platform/macos/config.cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-03 15:56:55 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-04 23:06:22 +0100
commit8bbf4c3be9ba6589dc0f7e5bf072cf68a57107b4 (patch)
tree0c46dc77841ccbce9e6f3e7285b6f525f07b69d1 /platform/macos/config.cmake
parentb35deb85bc6042380ae0e7154d02faef595cfcf7 (diff)
downloadqtlocation-mapboxgl-8bbf4c3be9ba6589dc0f7e5bf072cf68a57107b4.tar.gz
[build] add -fvisibility=hidden to macOS dynamic framework and export required symbols
Diffstat (limited to 'platform/macos/config.cmake')
-rw-r--r--platform/macos/config.cmake21
1 files changed, 11 insertions, 10 deletions
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"