mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
a recent Visual Studio update introduced an error unless there is a CMakePresets.json file present, completely blowing up the previous setup. after this commit, you should either delete the CMakeUserPresets.json file from your root or add it to your system - NOT repo! - excludesFile: https://stackoverflow.com/questions/7335420/global-git-ignore
12 lines
460 B
CMake
12 lines
460 B
CMake
function(CopyUserPresetTemplate)
|
|
if(
|
|
NOT DEFINED Languages AND
|
|
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()
|