summaryrefslogtreecommitdiff
path: root/next/platform/ios/ios.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'next/platform/ios/ios.cmake')
-rw-r--r--next/platform/ios/ios.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/next/platform/ios/ios.cmake b/next/platform/ios/ios.cmake
index 507150fc9a..10a6839c9d 100644
--- a/next/platform/ios/ios.cmake
+++ b/next/platform/ios/ios.cmake
@@ -3,6 +3,19 @@ target_compile_definitions(
PUBLIC MBGL_USE_GLES2 GLES_SILENCE_DEPRECATION
)
+if(NOT DEFINED IOS_DEPLOYMENT_TARGET)
+ set(IOS_DEPLOYMENT_TARGET "9.0")
+endif()
+
+macro(initialize_ios_target target)
+ set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "${IOS_DEPLOYMENT_TARGET}")
+ set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
+ set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE bitcode)
+ set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH $<$<CONFIG:Debug>:YES>)
+endmacro()
+
+set_target_properties(mbgl-core PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
+
target_sources(
mbgl-core
PRIVATE
@@ -15,6 +28,7 @@ target_sources(
${MBGL_ROOT}/platform/darwin/src/local_glyph_rasterizer.mm
${MBGL_ROOT}/platform/darwin/src/logging_nslog.mm
${MBGL_ROOT}/platform/darwin/src/nsthread.mm
+ ${MBGL_ROOT}/platform/darwin/src/number_format.mm
${MBGL_ROOT}/platform/darwin/src/reachability.m
${MBGL_ROOT}/platform/darwin/src/run_loop.cpp
${MBGL_ROOT}/platform/darwin/src/string_nsstring.mm
@@ -36,6 +50,7 @@ target_sources(
${MBGL_ROOT}/platform/default/src/mbgl/storage/sqlite3.cpp
${MBGL_ROOT}/platform/default/src/mbgl/text/bidi.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/compression.cpp
+ ${MBGL_ROOT}/platform/default/src/mbgl/util/monotonic_timer.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/png_writer.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/thread_local.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/utf.cpp
@@ -48,6 +63,9 @@ target_include_directories(
include(${PROJECT_SOURCE_DIR}/vendor/icu.cmake)
+initialize_ios_target(mbgl-core)
+initialize_ios_target(mbgl-vendor-icu)
+
target_link_libraries(
mbgl-core
PRIVATE
@@ -69,3 +87,5 @@ target_link_libraries(
sqlite3
z
)
+
+unset(IOS_DEPLOYMENT_TARGET CACHE)