build: Added CMakePresets.json file to make configuring/building easier

This commit is contained in:
WerWolv 2023-04-30 11:46:06 +02:00
parent fe9026b68d
commit 1bdc1d7241
2 changed files with 48 additions and 0 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ venv/
*.mgc
imgui.ini
.DS_Store
./CMakeUserPresets.json

47
CMakePresets.json Normal file
View file

@ -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": [
]
}