-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Add a CMakePresets.json for default configuration with Ninja &
MSVC
- Loading branch information
1 parent
3f7f834
commit 0d1748e
Showing
2 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
{ | ||
"version": 5, | ||
"configurePresets": [ | ||
{ | ||
"name": "common", | ||
"binaryDir": "${sourceDir}/build/${presetName}", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": true | ||
} | ||
}, | ||
{ | ||
"name": "build-debug", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "build-relwithdebinfo", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "RelWithDebInfo" | ||
} | ||
}, | ||
{ | ||
"name": "build-release", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "ninja", | ||
"hidden": true, | ||
"generator": "Ninja" | ||
}, | ||
{ | ||
"name": "qt6", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"USE_QT5": false | ||
} | ||
}, | ||
{ | ||
"name": "qt5", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"USE_QT5": true | ||
} | ||
}, | ||
{ | ||
"name": "ninja-debug", | ||
"displayName": "Ninja Debug", | ||
"description": "Build in Debug with Ninja generator", | ||
"inherits": ["common", "ninja", "build-debug", "qt6"] | ||
}, | ||
{ | ||
"name": "ninja-relwithdebinfo", | ||
"displayName": "Ninja RelWithDebInfo", | ||
"description": "Build in RelWithDebInfo with Ninja generator", | ||
"inherits": ["common", "ninja", "build-relwithdebinfo", "qt6"] | ||
}, | ||
{ | ||
"name": "ninja-release", | ||
"displayName": "Ninja Release", | ||
"description": "Build in Release with Ninja generator", | ||
"inherits": ["common", "ninja", "build-release", "qt6"] | ||
}, | ||
{ | ||
"name": "ninja-multi", | ||
"displayName": "Ninja Multi-Config", | ||
"description": "Default build using Ninja Multi-Config generator", | ||
"generator": "Ninja Multi-Config", | ||
"inherits": ["common", "ninja", "qt6"] | ||
}, | ||
{ | ||
"name": "msvc", | ||
"hidden": true, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
}, | ||
"cacheVariables": { | ||
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-17", | ||
"inherits": ["common", "msvc", "qt6"], | ||
"displayName": "Visual Studio 2022", | ||
"generator": "Visual Studio 17 2022", | ||
"description": "Configure using Visual Studio 17 2022 generator" | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "build-debug", | ||
"configuration": "Debug", | ||
"hidden": true | ||
}, | ||
{ | ||
"name": "build-relwithdebinfo", | ||
"configuration": "RelWithDebInfo", | ||
"hidden": true | ||
}, | ||
{ | ||
"name": "build-release", | ||
"configuration": "Release", | ||
"hidden": true | ||
}, | ||
{ | ||
"name": "ninja-debug", | ||
"configurePreset": "ninja-debug", | ||
"inherits": "build-debug" | ||
}, | ||
{ | ||
"name": "ninja-relwithdebinfo", | ||
"configurePreset": "ninja-relwithdebinfo", | ||
"inherits": "build-relwithdebinfo" | ||
}, | ||
{ | ||
"name": "ninja-release", | ||
"configurePreset": "ninja-release", | ||
"inherits": "build-release" | ||
}, | ||
{ | ||
"name": "ninja-multi-debug", | ||
"configurePreset": "ninja-multi", | ||
"inherits": "build-debug" | ||
}, | ||
{ | ||
"name": "ninja-multi-relwithdebinfo", | ||
"configurePreset": "ninja-multi", | ||
"inherits": "build-relwithdebinfo" | ||
}, | ||
{ | ||
"name": "ninja-multi-release", | ||
"configurePreset": "ninja-multi", | ||
"inherits": "build-release" | ||
}, | ||
{ | ||
"name": "msvc-17-debug", | ||
"configurePreset": "msvc-17", | ||
"inherits": "build-debug" | ||
}, | ||
{ | ||
"name": "msvc-17-relwithdebinfo", | ||
"configurePreset": "msvc-17", | ||
"inherits": "build-relwithdebinfo" | ||
}, | ||
{ | ||
"name": "msvc-17-release", | ||
"configurePreset": "msvc-17", | ||
"inherits": "build-release" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
SPDX-FileContributor: Olivier Le Doeuff <[email protected]> | ||
|
||
SPDX-License-Identifier: MIT OR Apache-2.0 |