From 1bdc1d72415b29e7e83847e33c38046ef1777749 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 30 Apr 2023 11:46:06 +0200 Subject: [PATCH] build: Added CMakePresets.json file to make configuring/building easier --- .gitignore | 1 + CMakePresets.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 CMakePresets.json diff --git a/.gitignore b/.gitignore index 1fa74bfcb..36b507f4f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ venv/ *.mgc imgui.ini .DS_Store +./CMakeUserPresets.json \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..7c4f2f0e8 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,47 @@ +{ + "version": 2, + "cmakeMinimumRequired": { + "major": 3, + "minor": 20, + "patch": 0 + }, + "configurePresets": [ + { + "name": "base", + "displayName": "Base", + "description": "Base configuration for all builds", + "hidden": true, + "binaryDir": "${sourceDir}/build/${presetName}", + "generator": "Ninja", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++", + "CMAKE_C_COMPILER_LAUNCHER": "ccache", + "CMAKE_CXX_COMPILER_LAUNCHER": "ccache", + "CMAKE_C_FLAGS": "-fuse-ld=lld", + "CMAKE_CXX_FLAGS": "-fuse-ld=lld", + "IMHEX_PATTERNS_PULL_MASTER": "ON", + "CMAKE_INSTALL_PREFIX": "./install", + "USE_SYSTEM_CURL": "ON" + } + }, + { + "name": "x86_64", + "displayName": "x86_64 Build", + "description": "x86_64 build", + "inherits": [ "base" ] + } + ], + "buildPresets": [ + { + "name": "x86_64", + "description": "x86_64 build", + "configurePreset": "x86_64", + "targets": [ "imhex_all" ] + } + ], + "testPresets": [ + + ] +} \ No newline at end of file