diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..87888d939 --- /dev/null +++ b/CMakePresets.json @@ -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" + } + ] +} diff --git a/CMakePresets.json.license b/CMakePresets.json.license new file mode 100644 index 000000000..fa9dff9a9 --- /dev/null +++ b/CMakePresets.json.license @@ -0,0 +1,4 @@ +SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company +SPDX-FileContributor: Olivier Le Doeuff + +SPDX-License-Identifier: MIT OR Apache-2.0