Split iOS CMake preset into ios (base) + ios-metal (#4096)
This commit is contained in:
2
.github/workflows/ios-ci.yml
vendored
2
.github/workflows/ios-ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user