From 6bf3c44b9cbc6627265a5a0efe3e7b374e293cd8 Mon Sep 17 00:00:00 2001 From: Fire Cube Date: Sun, 29 Jun 2025 22:14:52 +0200 Subject: [PATCH] Fix CMake presets for Linux (#3173) * Add platform specific base presets * Revert "Add platform specific base presets" This reverts commit a949a9f395f8ee7b9980b0e41f7c9c240b5ce41f. * better * cleanup * update REUSE --- CMakeLinuxPresets.json | 19 +++++++++++++++++++ CMakePresets.json | 38 +++----------------------------------- CMakeWindowsPresets.json | 26 ++++++++++++++++++++++++++ REUSE.toml | 2 ++ 4 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 CMakeLinuxPresets.json create mode 100644 CMakeWindowsPresets.json diff --git a/CMakeLinuxPresets.json b/CMakeLinuxPresets.json new file mode 100644 index 000000000..05d21e41a --- /dev/null +++ b/CMakeLinuxPresets.json @@ -0,0 +1,19 @@ +{ + "version": 9, + "cmakeMinimumRequired": { + "major": 3, + "minor": 30, + "patch": 0 + }, + "configurePresets": [ + { + "name": "x64-Clang-Base", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/Build/${presetName}", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}/Build/${presetName}" + } + } + ] +} \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json index 9dda9b68c..03af230c5 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -1,44 +1,12 @@ { - "version": 5, + "version": 9, "cmakeMinimumRequired": { "major": 3, - "minor": 24, + "minor": 30, "patch": 0 }, + "include": ["CMake${hostSystemName}Presets.json"], "configurePresets": [ - { - "name": "Base", - "hidden": true, - "generator": "Ninja", - "binaryDir": "${sourceDir}/Build/${presetName}", - "installDir": "${sourceDir}/Install/${presetName}" - }, - { - "name": "Qt-GUI", - "hidden": true, - "cacheVariables": { - "ENABLE_QT_GUI": "ON" - } - }, - { - "name": "x64-Windows-Base", - "inherits": [ "Base" ], - "hidden": true, - "cacheVariables": { - "CMAKE_C_COMPILER": "clang-cl", - "CMAKE_CXX_COMPILER": "clang-cl" - }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - }, - "vendor": { - "microsoft.com/VisualStudioSettings/CMake/1.0": { - "intelliSenseMode": "windows-clang-x64" - } - } - }, { "name": "x64-Clang-Debug", "displayName": "Clang x64 Debug", diff --git a/CMakeWindowsPresets.json b/CMakeWindowsPresets.json new file mode 100644 index 000000000..605fbfa94 --- /dev/null +++ b/CMakeWindowsPresets.json @@ -0,0 +1,26 @@ +{ + "version": 9, + "cmakeMinimumRequired": { + "major": 3, + "minor": 30, + "patch": 0 + }, + "configurePresets": [ + { + "name": "x64-Clang-Base", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/Build/${presetName}", + "cacheVariables": { + "CMAKE_C_COMPILER": "clang-cl", + "CMAKE_CXX_COMPILER": "clang-cl", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/Build/${presetName}" + }, + "vendor": { + "microsoft.com/VisualStudioSettings/CMake/1.0": { + "intelliSenseMode": "windows-clang-x64" + } + } + } + ] +} \ No newline at end of file diff --git a/REUSE.toml b/REUSE.toml index 4012ff19a..4b1c94d21 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -5,6 +5,8 @@ path = [ "REUSE.toml", "crowdin.yml", "CMakeSettings.json", + "CMakeLinuxPresets.json", + "CMakeWindowsPresets.json", "CMakePresets.json", ".github/FUNDING.yml", ".github/shadps4.png",