Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"version": 3,
"configurePresets": [
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"DISCORD_INTEGRATION": "ON",
"DEVILUTIONX_SYSTEM_BZIP2": "OFF"
}
},
{
"name": "x64-debug",
"displayName": "x64 Debug",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CPACK": "ON"
}
},
{
"name": "x64-relwithdebinfo",
"displayName": "x64 RelWithDebInfo",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CPACK": "ON"
}
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_GENERATOR_PLATFORM": "Win32"
}
},
{
"name": "x86-release",
"displayName": "x86 Release",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CPACK": "ON",
"CMAKE_GENERATOR_PLATFORM": "Win32"
}
},
{
"name": "x64-debug-translations",
"displayName": "x64 Debug (Translations)",
"inherits": "x64-debug",
"cacheVariables": {
"USE_GETTEXT_FROM_VCPKG": "ON"
}
},
{
"name": "x64-debug-sdl1",
"displayName": "x64 Debug (SDL1)",
"inherits": "x64-debug",
"cacheVariables": {
"USE_SDL1": "ON"
}
}
]
}
152 changes: 0 additions & 152 deletions CMakeSettings.json

This file was deleted.

9 changes: 5 additions & 4 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,12 @@ The location of this tool will need to be [added to the system's PATH environmen

### Compiling

* **Through Open->CMake in Visual Studio**
* **Through CMake Presets in Visual Studio (Recommended)**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it recommended? It's not how we do releases, it's mostly just for people that insist on using VS.


1. Go to `File -> Open -> CMake`, select `CMakeLists.txt` from the project root.
2. Select the `x64-Release` configuration (or `x86` for 32 bit builds, `-Debug` for debug builds).
3. Select `Build devilution.exe` from the `Build` menu.
1. Go to `File -> Open -> Folder` and select the devilutionx root folder. CMake will automatically detect the project and load the CMakePresets.json file. This may take several minutes.
2. Select a configuration from the configuration dropdown (e.g., `x64 Debug`).
3. Select `devilutionx.exe` from the Startup Item dropdown.
4. Select `Build devilutionx.exe` from the `Build` menu.

* **Through GCC/WSL in Visual Studio**

Expand Down
2 changes: 0 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "devilutionx",
"version-string": "1.6.0",
"dependencies": [
"fmt",
"bzip2",
"lua",
"magic-enum"
],
Expand Down
Loading