Skip to content

Conversation

@strich
Copy link
Collaborator

@strich strich commented Feb 8, 2026

Summary

Migrated build configurations from the legacy CMakeSettings.json to the modern CMakePresets.json standard. This improves compatibility across IDEs (Visual Studio, VS Code, CLion) and command-line workflows.

Changes

  • Migrated to CMake Presets: Added CMakePresets.json containing standard configurations for x64/x86 Debug and Release builds, as well as specialized presets for translations and SDL1.
  • Removed Legacy Config: Deleted CMakeSettings.json as it is superseded by the new presets.
  • Dependency Cleanup: Removed fmt and bzip2 from vcpkg.json to resolve build issues with these specific dependencies in the vcpkg environment.
  • Documentation Update: Updated docs/building.md to reflect the new recommended workflow for building in Visual Studio using CMake Presets.

How to use

In Visual Studio, simply open the project folder. The IDE will automatically detect the presets. Select your desired configuration from the dropdown (e.g., x64 Debug) and build.

Comment on lines 298 to 303

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

1. Ensure the WSL environment has the build pre-requisites for both devilutionX (see "Installing Dependencies on Debian and Ubuntu" under the "Linux" section above) and [WSL remote development](https://docs.microsoft.com/en-us/cpp/linux/connect-to-your-remote-linux-computer?view=msvc-160#connect-to-wsl).
2. Select the `WSL-GCC-x64-Debug` configuration.
3. Select `Build devilution` from the `Build` menu.
Copy link
Member

Choose a reason for hiding this comment

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

This section should be removed because the configuration was dropped in the migration from CMakeSettings.json to CMakePresets.json.

Suggested change

@StephenCWills
Copy link
Member

I understand the issue with bzip2, but what's wrong with the fmt package?

@strich
Copy link
Collaborator Author

strich commented Feb 8, 2026

fmt has the same issue as bzip2 - vcpkg fails to pull it with an "unknown error".

@StephenCWills
Copy link
Member

Seems like fmt comes from GitHub so it doesn't make sense that it would have the same issue as bzip2.

https://github.com/microsoft/vcpkg/blob/aa2d37682e3318d93aef87efa7b0e88e81cd3d59/ports/fmt/portfile.cmake#L1-L7

vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO fmtlib/fmt
    REF "${VERSION}"
    SHA512 f0da82c545b01692e9fd30fdfb613dbb8dd9716983dcd0ff19ac2a8d36f74beb5540ef38072fdecc1e34191b3682a8542ecbf3a61ef287dbba0a2679d4e023f2
    HEAD_REF master
)

Actually, bzip2 has a mirror service URL defined in its vcpkg configuration. So I'm starting to wonder why you're having any problems in the first place.

https://github.com/microsoft/vcpkg/blob/aa2d37682e3318d93aef87efa7b0e88e81cd3d59/ports/bzip2/portfile.cmake#L1-L6

vcpkg_download_distfile(ARCHIVE
    URLS "https://sourceware.org/pub/bzip2/bzip2-${VERSION}.tar.gz"
         "https://www.mirrorservice.org/sites/sourceware.org/pub/bzip2/bzip2-${VERSION}.tar.gz"
    FILENAME "bzip2-${VERSION}.tar.gz"
    SHA512 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
)

### 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants