From db6e31d2bcccb5b03cbda7e170f9c45a52c0aa6f Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 17 Sep 2025 10:28:23 -0700 Subject: [PATCH] Upgrade to CMake 3.21 --- CMakeLists.txt | 2 +- CMakePresets.json | 11 +++-------- README.md | 2 ++ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c31385..5a91b61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. -cmake_minimum_required (VERSION 3.20) +cmake_minimum_required (VERSION 3.21) set(DXUT_VERSION 11.32) diff --git a/CMakePresets.json b/CMakePresets.json index 32ff184..9121f86 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -1,5 +1,5 @@ { - "version": 2, + "version": 3, "configurePresets": [ { "name": "base", @@ -8,7 +8,7 @@ "generator": "Ninja", "hidden": true, "binaryDir": "${sourceDir}/out/build/${presetName}", - "cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" } + "installDir": "${sourceDir}/out/install/${presetName}" }, { @@ -119,12 +119,7 @@ { "name": "VCPKG", - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": { - "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", - "type": "FILEPATH" - } - }, + "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", "hidden": true }, { diff --git a/README.md b/README.md index 208d72d..1b1b2d2 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ FOR SECURITY ADVISORIES, see [GitHub](https://github.com/microsoft/DXUT/security For a full change history, see [CHANGELOG.md](https://github.com/microsoft/DXUT/blob/main/CHANGELOG.md). +* The CMake projects require 3.21 or later. VS 2019 users will need to install a standalone version of CMake 3.21 or later and add it to their PATH. + * Starting with the July 2022 release, the ``bool forceSRGB`` parameter for DDSTextureLoader ``Ex`` functions is now a ``DDS_LOADER_FLAGS`` typed enum bitmask flag parameter. This may have a _breaking change_ impact to client code. Replace ``true`` with ``DDS_LOADER_FORCE_SRGB`` and ``false`` with ``DDS_LOADER_DEFAULT``. * There are known codegen issues when mixing the library built with Visual C++ and the sample built with recent builds of clang/LLVM for Windows. Building both the library and the sample using the same complier avoids the issue.