From e0937131b109bf97b06753ef78b1e83321578af4 Mon Sep 17 00:00:00 2001 From: Grayson Riffe Date: Mon, 20 Jan 2025 18:32:12 -0600 Subject: [PATCH] Add basic CMake project --- .gitignore | 1 + CMakeLists.txt | 5 +++++ CMakePresets.json | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 CMakePresets.json diff --git a/.gitignore b/.gitignore index 88dbff1..9a44da1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vs/ +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..86ed76d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +# Mainspring CMakeLists.txt + +cmake_minimum_required(VERSION 3.20) + +project(mainspring) \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..39cfc68 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,50 @@ +// Mainspring CMake presets + +{ + "version": 3, + + "configurePresets": [ + { + "name": "base", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe" + } + }, + + { + "name": "Debug", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + + { + "name": "Release", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + + "buildPresets": [ + { + "name": "Debug", + "configurePreset": "Debug" + }, + + { + "name": "Release", + "configurePreset": "Release" + } + ] +} \ No newline at end of file