Split iOS CMake preset into ios (base) + ios-metal (#4096)

This commit is contained in:
Birk Skyum
2026-02-12 12:10:33 +01:00
committed by GitHub
parent 1020057393
commit f9caebd1d4
3 changed files with 14 additions and 8 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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
```