mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
ship CMakePresets.json instead of copying a template
Co-Authored-By: Grok 4.6 <noreply@x.ai>
This commit is contained in:
committed by
majcosta
co-authored by
Grok 4.6
parent
c9100aacee
commit
69764e4459
@@ -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()
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user