summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-11-21 16:43:22 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-11-22 15:54:26 +0100
commitbf7ab7ba2b1ca952a62cef12d578795a332a12cd (patch)
tree4e4d30edb621be09af1aeeaf3dabb706e06f0525 /cmake
parentdff218c30e6628eb0fb9bd0023c05cceb16132cd (diff)
downloadqtlocation-mapboxgl-bf7ab7ba2b1ca952a62cef12d578795a332a12cd.tar.gz
[build] reduce framework size for Release builds on macOS
Diffstat (limited to 'cmake')
-rw-r--r--cmake/loop-darwin.cmake2
-rw-r--r--cmake/mbgl.cmake5
2 files changed, 7 insertions, 0 deletions
diff --git a/cmake/loop-darwin.cmake b/cmake/loop-darwin.cmake
index 16bc62537c..7884c80a69 100644
--- a/cmake/loop-darwin.cmake
+++ b/cmake/loop-darwin.cmake
@@ -4,6 +4,8 @@ add_library(mbgl-loop STATIC
platform/darwin/src/timer.cpp
)
+set_xcode_property(mbgl-loop GCC_SYMBOLS_PRIVATE_EXTERN YES)
+
target_compile_options(mbgl-loop
PRIVATE -fPIC
PRIVATE -fvisibility-inlines-hidden
diff --git a/cmake/mbgl.cmake b/cmake/mbgl.cmake
index f20f49004c..b2b959e6c1 100644
--- a/cmake/mbgl.cmake
+++ b/cmake/mbgl.cmake
@@ -35,6 +35,11 @@ function(create_source_groups target)
endforeach()
endfunction()
+# This little macro lets you set any XCode specific property
+macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
+ set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
+endmacro (set_xcode_property)
+
function(_write_xcconfig_var target var)
get_property(result TARGET ${target} PROPERTY INTERFACE_${var} SET)
if (result)