build: hardcode VS2022 toolchain in CMake presets #1519
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1519
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1519/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@KelboLive on GitHub · 2026-11-24 13:30 UTC · original
KelboLive:work/pr4-negative-controls→main· +0 −0 · 0 files · 0 commits · closed without mergingThis change hardcodes VS2022 toolchain paths (INCLUDE, LIB, PATH, CMAKE_LINKER) in the
devandreleaseCMake presets so CMake locates the correct compiler toolchain without depending on the calling shell's environment variables.Files changed:
CMakePresets.jsonTest command
cmake --preset devcmake --build --preset devctest --preset dev --no-tests=error -R 'desktop_root_signature'Expected result: All configured and build steps locate vsdevcmd.bat automatically. The toolchain environment is applied regardless of how the terminal was started.
Observed result: Build proceeds successfully with the VS2022 toolchain paths set at preset level.
Environment: x64 Windows, Visual Studio 2022 Desktop development with C++ workload (x64 MSVC, C++ CMake tools, Ninja, Windows SDK). No external shell modifications needed before invoking
cmake --preset dev.Risk assessment: Low-risk build-infra change. Only affects CMake integration; no game code or runtime behavior changes.
Refs #4
@KelboLive on GitHub · 2026-11-24 15:06 UTC · original
Rebased onto current origin/main. The hardcoded VS2022 toolchain paths in CMakePresets.json have been reverted — the presets are now portable and no longer pin a specific Visual Studio edition, MSVC toolset version, or SDK path. Users can override with CMakeUserPresets.json (gitignored) if they need machine-specific paths.
@R0Y00 on GitHub · 2026-11-24 13:40 UTC · original · requested changes
Both shared presets pin one product edition, toolset and SDK path, and the PATH value replaces the inherited environment. The pinned linker directory is absent on my current Visual Studio installation, whose existing tools/dev.ps1 discovery succeeds. Keep checked-in presets portable. A machine-local CMakeUserPresets override can hold fixed paths, or an optional discovery improvement can use the existing setup script and verify two different installations.
Pull request closed