Skip to content

Commit 2dafd07

Browse files
committed
build: add a CMakePresets for the project
This adds a default configuration that is recommended as a preset: - Release Build with Ninja, with `-sdk %SDKROOT%` as the Swift flags. This should help make it get started with the CMake based build with VSCode or any IDE which supports CMakePresets.
1 parent 2f7c0b9 commit 2dafd07

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

CMakePresets.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": 3,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 21,
6+
"patch": 0
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "Default",
11+
"displayName": "Release Build (Ninja)",
12+
"description": "Defaults",
13+
"generator": "Ninja",
14+
"binaryDir": "${sourceDir}/.build/x86_64-unknown-windows-msvc/Release",
15+
"cacheVariables": {
16+
"BUILD_SHARED_LIBS": "YES",
17+
"CMAKE_BUILD_TYPE": "Release",
18+
"CMAKE_Swift_FLAGS": "-sdk $env{SDKROOT}"
19+
}
20+
}
21+
],
22+
"buildPresets": [
23+
{
24+
"name": "Default",
25+
"configurePreset": "Default"
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)