ship CMakePresets.json instead of copying a template

Co-Authored-By: Grok 4.6 <noreply@x.ai>
This commit is contained in:
Marco Antonio J. Costa
2026-08-20 15:15:10 -03:00
committed by majcosta
co-authored by Grok 4.6
parent c9100aacee
commit 69764e4459
7 changed files with 65 additions and 61 deletions
-10
View File
@@ -1,10 +0,0 @@
function(CopyUserPresetTemplate)
if(
NOT DEFINED Applications AND
NOT EXISTS "${CMAKE_SOURCE_DIR}/CMakePresets.json" AND
NOT EXISTS "${CMAKE_SOURCE_DIR}/CMakeUserPresets.json"
)
file(COPY "${CMAKE_SOURCE_DIR}/cmake/presets/CMakePresets.json" DESTINATION "${CMAKE_SOURCE_DIR}")
message(FATAL_ERROR "No existing preset was found, copied a preset template to ${CMAKE_SOURCE_DIR}/CMakePresets.json.")
endif()
endfunction()
-41
View File
@@ -1,41 +0,0 @@
{
"version": 3,
"configurePresets": [
{
"name": "__userBase",
"hidden": true,
"description": "Applications takes any of JA2, JA2MAPEDITOR, JA2UB, JA2UBMAPEDITOR, and builds all four when empty. Set CMAKE_RUNTIME_OUTPUT_DIRECTORY to a gamedir, e.g. C:/Games/JA2, to put the executables where they can be debugged.",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"Applications": "JA2",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "."
},
"architecture": {
"value": "x86",
"strategy": "external"
}
},
{
"name": "1dot13 RelWithDebInfo",
"inherits": "__userBase",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "1dot13 Release",
"inherits": "__userBase",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "1dot13 Debug",
"inherits": "__userBase",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
}
]
}