diff --git a/.gitignore b/.gitignore index 3853e47221..9926bc85b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# CMake presets for local build configurations: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#build-preset +CMakeUserPresets.json + ################# ## Eclipse ################# diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000000..81ec942523 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,44 @@ +{ + "version": 2, + "configurePresets": [ + { + "name": "x86-Debug", + "displayName": "x86-Debug", + "description": "Visual Studio 16 2019 - x86 - Debug mode", + "generator": "Visual Studio 16 2019", + "toolset": "host=x86", + "architecture": "win32", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/${presetName}" + } + }, + { + "name": "x86-Release", + "displayName": "x86-Release", + "description": "Visual Studio 16 2019 - x86 - Release mode", + "generator": "Visual Studio 16 2019", + "toolset": "host=x86", + "architecture": "win32", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/${presetName}" + } + }, + { + "name": "x86-RelWithDebInfo", + "displayName": "x86-RelWithDebInfo", + "description": "Visual Studio 16 2019 - x86 - Release mode with Debug Info", + "generator": "Visual Studio 16 2019", + "toolset": "host=x86", + "architecture": "win32", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/${presetName}" + } + } + ] +} \ No newline at end of file diff --git a/CMakeUserPresets.json.template b/CMakeUserPresets.json.template new file mode 100644 index 0000000000..b156ddfbfb --- /dev/null +++ b/CMakeUserPresets.json.template @@ -0,0 +1,32 @@ +{ + "version": 2, + "configurePresets": [ + { + "name": "x86-Debug-install", + "displayName": "x86-Debug-install", + "description": "Visual Studio 16 2019 - x86 - Debug mode - installs binaries to Jedi Academy install directory", + "inherits": "x86-Debug", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "/steamapps/common/Jedi Academy/GameData" + } + }, + { + "name": "x86-Release-install", + "displayName": "x86-Release-install", + "description": "Visual Studio 16 2019 - x86 - Release mode - installs binaries to Jedi Academy install directory", + "inherits": "x86-Release", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "/steamapps/common/Jedi Academy/GameData" + } + }, + { + "name": "x86-RelWithDebInfo-install", + "displayName": "x86-RelWithDebInfo-install", + "description": "Visual Studio 16 2019 - x86 - Release mode with Debug Info - installs binaries to Jedi Academy install directory", + "inherits": "x86-RelWithDebInfo", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "/steamapps/common/Jedi Academy/GameData" + } + } + ] +} \ No newline at end of file