diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 352b934..5a95d91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: build-windows: uses: ./.github/workflows/windows.yml with: - cmake-version: '3.31.0' + cmake-version: '4.2.7' platforms: "['x64', 'Win32', 'ARM64']" configurations: "['RelWithDebInfo', 'Debug']" # MacOS diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c7c84ea..e48b9f4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -16,6 +16,11 @@ on: jobs: build: runs-on: windows-latest + env: + # CMake 4.x removed compatibility with cmake_minimum_required(VERSION < 3.5). + # The vendored RapidJSON source (downloaded at configure time) still declares an + # older minimum, so clamp the policy version for its nested/child configures. + CMAKE_POLICY_VERSION_MINIMUM: "3.5" strategy: matrix: platform: ${{ fromJson(inputs.platforms) }} @@ -26,11 +31,11 @@ jobs: with: submodules: 'true' - name: Setup CMake - uses: jwlawson/actions-setup-cmake@v2.0.2 + uses: jwlawson/actions-setup-cmake@v2.2.0 with: cmake-version: ${{ inputs.cmake-version }} - name: CMake Configure - run: cmake -G "Visual Studio 17 2022" -A ${{ matrix.platform }} -B ./Built/Int/cmake_${{ matrix.platform }} . + run: cmake -G "Visual Studio 18 2026" -A ${{ matrix.platform }} -B ./Built/Int/cmake_${{ matrix.platform }} . - name: CMake Build run: cmake --build . --target install --config ${{ matrix.config }} working-directory: ./Built/Int/cmake_${{ matrix.platform }} diff --git a/External/RapidJSON/CMakeRapidJSONDownload.txt.in b/External/RapidJSON/CMakeRapidJSONDownload.txt.in index ed9135e..9e3be43 100644 --- a/External/RapidJSON/CMakeRapidJSONDownload.txt.in +++ b/External/RapidJSON/CMakeRapidJSONDownload.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.5) project(RapidJSON-download NONE) diff --git a/GLTFSDK.Samples/CMakeLists.txt b/GLTFSDK.Samples/CMakeLists.txt index a66ed93..b8062b1 100644 --- a/GLTFSDK.Samples/CMakeLists.txt +++ b/GLTFSDK.Samples/CMakeLists.txt @@ -1,4 +1,11 @@ cmake_minimum_required(VERSION 3.5) +# Visual Studio 2026 (MSVC 14.5x) removed the header that +# these samples fall back to under C++14. Build the samples as C++17 so they use the +# standard header instead (see each sample's Source/main.cpp). The GLTFSDK +# library itself continues to target C++14. +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + add_subdirectory(Deserialize) add_subdirectory(Serialize)