diff options
author | Julian Rex <julian.rex@gmail.com> | 2020-05-13 11:48:27 -0400 |
---|---|---|
committer | Julian Rex <julian.rex@gmail.com> | 2020-05-13 11:48:27 -0400 |
commit | 8aea69e69f18eebe6d9d942eee5882766bc722ab (patch) | |
tree | 4b5ab9fc2dd52f25be9053f7535a24850def6816 | |
parent | 3688c260a5b8b08c78458b6ec04d8c14670f60b7 (diff) | |
download | qtlocation-mapboxgl-8aea69e69f18eebe6d9d942eee5882766bc722ab.tar.gz |
Update macos.cmake
-rw-r--r-- | platform/macos/macos.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platform/macos/macos.cmake b/platform/macos/macos.cmake index 3cd4df090f..86aafb6294 100644 --- a/platform/macos/macos.cmake +++ b/platform/macos/macos.cmake @@ -2,6 +2,18 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11") set_target_properties(mbgl-core PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES) +macro(initialize_macos_target target) + # Enable LTO & -Os for Release and RelWithDebInfo (which is currently still used by iOS release packages) + + set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL $<$<CONFIG:RELEASE>:s>) + set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL $<$<CONFIG:RELWITHDEBINFO>:s>) + set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_LLVM_LTO $<$<CONFIG:RELEASE>:YES>) + set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_LLVM_LTO $<$<CONFIG:RELWITHDEBINFO>:YES>) +endmacro() + + + + if(MBGL_WITH_OPENGL) find_package(OpenGL REQUIRED) @@ -77,6 +89,9 @@ target_include_directories( include(${PROJECT_SOURCE_DIR}/vendor/icu.cmake) +initialize_macos_target(mbgl-core) +initialize_macos_target(mbgl-vendor-icu) + target_link_libraries( mbgl-core PRIVATE |