From f9caebd1d44478587b60e37bfd74c0d6dee7b412 Mon Sep 17 00:00:00 2001 From: Birk Skyum <74932975+birkskyum@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:10:33 +0100 Subject: [PATCH] Split iOS CMake preset into ios (base) + ios-metal (#4096) --- .github/workflows/ios-ci.yml | 2 +- CMakePresets.json | 18 ++++++++++++------ docs/mdbook/src/platforms/ios/README.md | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ios-ci.yml b/.github/workflows/ios-ci.yml index 0c9c159d4..4f4002a20 100644 --- a/.github/workflows/ios-ci.yml +++ b/.github/workflows/ios-ci.yml @@ -230,7 +230,7 @@ jobs: submodules: recursive - name: Configure build with CMake - run: cmake --preset ios + run: cmake --preset ios-metal - name: Build mbgl-core run: cmake --build build-ios --target mbgl-core ios-sdk-static app diff --git a/CMakePresets.json b/CMakePresets.json index 5210c1dee..87c6f394f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -8,17 +8,14 @@ "configurePresets": [ { "name": "ios", - "displayName": "iOS", + "hidden": true, "generator": "Xcode", - "description": "Create Xcode project for iOS", - "binaryDir": "${sourceDir}/build-ios", + "description": "Base iOS preset", "toolchainFile": "${sourceDir}/platform/ios/ios.toolchain.cmake", "cacheVariables": { "CMAKE_SYSTEM_NAME": "iOS", "CMAKE_CXX_COMPILER_LAUNCHER": "ccache", - "CMAKE_OSX_DEPLOYMENT_TARGET": "14.0", - "MLN_WITH_METAL": "ON", - "MLN_WITH_OPENGL": "OFF" + "CMAKE_OSX_DEPLOYMENT_TARGET": "14.0" }, "condition": { "type": "equals", @@ -26,6 +23,15 @@ "rhs": "Darwin" } }, + { + "name": "ios-metal", + "displayName": "iOS Metal", + "inherits": "ios", + "binaryDir": "${sourceDir}/build-ios", + "cacheVariables": { + "MLN_WITH_METAL": "ON" + } + }, { "name": "macos", "hidden": true, diff --git a/docs/mdbook/src/platforms/ios/README.md b/docs/mdbook/src/platforms/ios/README.md index eb42e12ef..33bbc97a6 100644 --- a/docs/mdbook/src/platforms/ios/README.md +++ b/docs/mdbook/src/platforms/ios/README.md @@ -78,7 +78,7 @@ You can also build targets from the command line. For example, if you want to bu It is also possible to generate an Xcode project using CMake. As of February 2025, targets `mbgl-core`, `ios-sdk-static` and `app` (Objective-C development app) are supported. ``` -cmake --preset ios -DDEVELOPMENT_TEAM_ID=YOUR_TEAM_ID +cmake --preset ios-metal -DDEVELOPMENT_TEAM_ID=YOUR_TEAM_ID xed build-ios/MapLibre\ Native.xcodeproj ```