Add macos-metal cmake preset (#3901)
This commit is contained in:
@@ -30,18 +30,26 @@
|
|||||||
"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",
|
||||||
"MLN_WITH_METAL": "ON",
|
|
||||||
"MLN_WITH_OPENGL": "OFF",
|
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"MLN_DARWIN_USE_LIBUV": "ON"
|
"MLN_DARWIN_USE_LIBUV": "ON"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "macos-xcode",
|
"name": "macos-metal",
|
||||||
|
"displayName": "macOS Metal",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-macos-metal",
|
||||||
|
"inherits": "macos",
|
||||||
|
"cacheVariables": {
|
||||||
|
"MLN_WITH_METAL": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-metal-xcode",
|
||||||
"displayName": "macOS (Xcode)",
|
"displayName": "macOS (Xcode)",
|
||||||
"generator": "Xcode",
|
"generator": "Xcode",
|
||||||
"binaryDir": "${sourceDir}/build-macos-xcode",
|
"binaryDir": "${sourceDir}/build-macos-metal-xcode",
|
||||||
"inherits": "macos"
|
"inherits": "macos-metal"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "macos-vulkan",
|
"name": "macos-vulkan",
|
||||||
@@ -50,9 +58,7 @@
|
|||||||
"binaryDir": "${sourceDir}/build-macos-vulkan",
|
"binaryDir": "${sourceDir}/build-macos-vulkan",
|
||||||
"inherits": "macos",
|
"inherits": "macos",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"MLN_WITH_VULKAN": "ON",
|
"MLN_WITH_VULKAN": "ON"
|
||||||
"MLN_WITH_METAL": "OFF",
|
|
||||||
"MLN_WITH_OPENGL": "OFF"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -64,7 +70,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "macos-metal-node",
|
"name": "macos-metal-node",
|
||||||
"inherits": "macos",
|
"inherits": "macos-metal",
|
||||||
"binaryDir": "${sourceDir}/build",
|
"binaryDir": "${sourceDir}/build",
|
||||||
"displayName": "MacOS Node",
|
"displayName": "MacOS Node",
|
||||||
"description": "MacOS Node build (Metal renderer)",
|
"description": "MacOS Node build (Metal renderer)",
|
||||||
@@ -82,8 +88,6 @@
|
|||||||
"binaryDir": "${sourceDir}/build-macos-webgpu-dawn",
|
"binaryDir": "${sourceDir}/build-macos-webgpu-dawn",
|
||||||
"inherits": "macos",
|
"inherits": "macos",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"MLN_WITH_METAL": "OFF",
|
|
||||||
"MLN_WITH_OPENGL": "OFF",
|
|
||||||
"MLN_WITH_WEBGPU": "ON",
|
"MLN_WITH_WEBGPU": "ON",
|
||||||
"MLN_WEBGPU_IMPL": "dawn",
|
"MLN_WEBGPU_IMPL": "dawn",
|
||||||
"MLN_DARWIN_USE_LIBUV": "ON"
|
"MLN_DARWIN_USE_LIBUV": "ON"
|
||||||
@@ -96,8 +100,6 @@
|
|||||||
"binaryDir": "${sourceDir}/build-macos-webgpu-wgpu",
|
"binaryDir": "${sourceDir}/build-macos-webgpu-wgpu",
|
||||||
"inherits": "macos",
|
"inherits": "macos",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"MLN_WITH_METAL": "OFF",
|
|
||||||
"MLN_WITH_OPENGL": "OFF",
|
|
||||||
"MLN_WITH_WEBGPU": "ON",
|
"MLN_WITH_WEBGPU": "ON",
|
||||||
"MLN_WEBGPU_IMPL": "wgpu",
|
"MLN_WEBGPU_IMPL": "wgpu",
|
||||||
"MLN_DARWIN_USE_LIBUV": "ON"
|
"MLN_DARWIN_USE_LIBUV": "ON"
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ build-macos/mbgl-test-runner
|
|||||||
Create and open an Xcode project with CMake:
|
Create and open an Xcode project with CMake:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cmake --preset macos-xcode
|
cmake --preset macos-metal-xcode
|
||||||
xed build-macos-xcode/MapLibre\ Native.xcodeproj
|
xed build-macos-metal-xcode/MapLibre\ Native.xcodeproj
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure project for Vulkan (make sure [MoltenVK](https://github.com/KhronosGroup/MoltenVK) is installed):
|
Configure project for Vulkan (make sure [MoltenVK](https://github.com/KhronosGroup/MoltenVK) is installed):
|
||||||
|
|||||||
Reference in New Issue
Block a user