Update CMakePresets.json and docs for macOS (#3909)
This commit is contained in:
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@@ -40,6 +40,7 @@ build:
|
|||||||
- '**/*.cmake'
|
- '**/*.cmake'
|
||||||
- '**/BUILD.bazel'
|
- '**/BUILD.bazel'
|
||||||
- '**/*.bzl'
|
- '**/*.bzl'
|
||||||
|
- CMakePresets.json
|
||||||
OpenGL:
|
OpenGL:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
|
|||||||
8
.github/workflows/core-release.yml
vendored
8
.github/workflows/core-release.yml
vendored
@@ -57,13 +57,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Build mbgl-core for macOS
|
- name: Build mbgl-core for macOS
|
||||||
run: |
|
run: |
|
||||||
cmake --preset macos -DCMAKE_CXX_COMPILER_LAUNCHER="" -DMLN_WITH_GLFW=OFF
|
cmake --preset macos-metal -DCMAKE_CXX_COMPILER_LAUNCHER="" -DMLN_WITH_GLFW=OFF
|
||||||
cmake --build build-macos --target mbgl-core
|
cmake --build build-macos-metal --target mbgl-core
|
||||||
|
|
||||||
- name: Rename artifact
|
- name: Rename artifact
|
||||||
run: |
|
run: |
|
||||||
cp build-macos/libmbgl-core.a libmaplibre-native-core-macos-arm64-metal.a
|
cp build-macos-metal/libmbgl-core.a libmaplibre-native-core-macos-arm64-metal.a
|
||||||
cp build-macos/libmbgl-core-amalgam.a libmaplibre-native-core-amalgam-macos-arm64-metal.a
|
cp build-macos-metal/libmbgl-core-amalgam.a libmaplibre-native-core-amalgam-macos-arm64-metal.a
|
||||||
|
|
||||||
- name: Upload macOS artifacts
|
- name: Upload macOS artifacts
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
|||||||
@@ -19,19 +19,28 @@
|
|||||||
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.0",
|
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.0",
|
||||||
"MLN_WITH_METAL": "ON",
|
"MLN_WITH_METAL": "ON",
|
||||||
"MLN_WITH_OPENGL": "OFF"
|
"MLN_WITH_OPENGL": "OFF"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "macos",
|
"name": "macos",
|
||||||
"displayName": "macOS",
|
"hidden": true,
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"binaryDir": "${sourceDir}/build-macos",
|
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_SYSTEM_NAME": "Darwin",
|
"CMAKE_SYSTEM_NAME": "Darwin",
|
||||||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
||||||
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.3",
|
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.3",
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"MLN_DARWIN_USE_LIBUV": "ON"
|
"MLN_DARWIN_USE_LIBUV": "ON"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -122,6 +131,11 @@
|
|||||||
"MLN_WITH_CLANG_TIDY": "OFF",
|
"MLN_WITH_CLANG_TIDY": "OFF",
|
||||||
"MLN_WITH_WAYLAND": "ON",
|
"MLN_WITH_WAYLAND": "ON",
|
||||||
"MLN_WITH_X11": "OFF"
|
"MLN_WITH_X11": "OFF"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -189,6 +203,11 @@
|
|||||||
"MLN_WITH_EGL": "OFF",
|
"MLN_WITH_EGL": "OFF",
|
||||||
"MLN_WITH_VULKAN": "OFF",
|
"MLN_WITH_VULKAN": "OFF",
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ xed platform/macos/MapLibre.xcodeproj
|
|||||||
Configure CMake:
|
Configure CMake:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cmake --preset macos
|
cmake --preset macos-metal
|
||||||
```
|
```
|
||||||
|
|
||||||
Build and run the render tests:
|
Build and run the render tests:
|
||||||
@@ -70,10 +70,10 @@ build-macos/mbgl-render-test-runner --manifestPath=metrics/macos-xcode11-release
|
|||||||
Build and run the C++ Tests:
|
Build and run the C++ Tests:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cmake --build build-macos --target mbgl-test-runner
|
cmake --build build-macos-metal --target mbgl-test-runner
|
||||||
npm install && node test/storage/server.js # required test server
|
npm install && node test/storage/server.js # required test server
|
||||||
# in another terminal
|
# in another terminal
|
||||||
build-macos/mbgl-test-runner
|
build-macos-metal/mbgl-test-runner
|
||||||
```
|
```
|
||||||
|
|
||||||
Create and open an Xcode project with CMake:
|
Create and open an Xcode project with CMake:
|
||||||
|
|||||||
Reference in New Issue
Block a user