Update Windows CI and samples to Visual Studio 2026#175
Merged
SergioRZMasson merged 1 commit intoJul 14, 2026
Merged
Conversation
The CI Windows runners no longer provide Visual Studio 2022, so the "Visual Studio 17 2022" CMake generator fails to configure. Move the Windows build to Visual Studio 2026: - windows.yml: use the "Visual Studio 18 2026" generator (requires CMake >= 4.2) and bump jwlawson/actions-setup-cmake to v2.2.0. - ci.yml: pin the Windows CMake version to 4.2.7. - Set CMAKE_POLICY_VERSION_MINIMUM=3.5 for the Windows job: CMake 4.x removed compatibility with cmake_minimum_required(VERSION < 3.5), and the vendored RapidJSON source (downloaded at configure time) still declares an older minimum. Also bump the RapidJSON and googletest download drivers' own minimums to 3.5. - Port the samples to std::filesystem: the VS 2026 MSVC toolset removed <experimental/filesystem>, which the samples used. Build the samples as C++17 and use the standard <filesystem> header. The GLTFSDK library itself still targets C++14. Validated locally with VS 2026 + CMake 4.2.7 for x64 and Win32 (RelWithDebInfo and Debug); all 389 unit tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 039828de-4db2-48f8-a5de-c9f7d33baffa
bghgary
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Windows CI is currently broken: GitHub's Windows runners no longer include
Visual Studio 2022, so the
Visual Studio 17 2022CMake generator fails toconfigure with:
CMake Error at CMakeLists.txt:2 (project): Generator "Visual Studio 17 2022" could not find any instance of Visual Studio.
This moves the Windows build to Visual Studio 2026 (backport of the same
change targeting
master).Changes
.github/workflows/windows.ymlVisual Studio 18 2026CMake generator (added in CMake 4.2).jwlawson/actions-setup-cmaketov2.2.0.CMAKE_POLICY_VERSION_MINIMUM=3.5for the Windows job (see Notes)..github/workflows/ci.yml: pin the Windows CMake version to4.2.7(macOS / iOS / Linux stay on
3.31.0).External/RapidJSON/CMakeRapidJSONDownload.txt.inandExternal/googletest/CMakeGoogleTestDownload.txt.in: bumpcmake_minimum_requiredto3.5.GLTFSDK.Samples/CMakeLists.txt: build the samples as C++17.GLTFSDK.Samples/{Serialize,Deserialize}/Source/main.cpp: use the standard<filesystem>header andstd::filesysteminstead of<experimental/filesystem>.Notes
cmake_minimum_required(VERSION < 3.5). The vendored RapidJSON source(downloaded at configure time) still declares an older minimum, so the Windows
job sets
CMAKE_POLICY_VERSION_MINIMUM=3.5, which is inherited by the nestedconfigure steps. The RapidJSON and googletest download drivers' own minimums
are also bumped to
3.5.<experimental/filesystem>removal — the VS 2026 MSVC toolset removed<experimental/filesystem>, which the samples used. The samples now compile asC++17 and use the standard
<filesystem>header. The GLTFSDK library itselfcontinues to target C++14.
Validation
Built locally with Visual Studio 2026 + CMake 4.2.7 for x64 and Win32 in
both RelWithDebInfo and Debug; all 389 unit tests pass in every
configuration. ARM64 uses the identical configuration (build-only in CI).