Skip to content

Commit 5fdef78

Browse files
authored
Upgrade to CMake 3.21 (#581)
1 parent 325dc93 commit 5fdef78

File tree

6 files changed

+21
-12
lines changed

6 files changed

+21
-12
lines changed

.github/workflows/bvt.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ jobs:
4444

4545
matrix:
4646
toolver: ['14.29', '14']
47-
build_type: [x64-Release]
47+
build_type: [x64-Release, x64-Release-Win10]
4848
arch: [amd64]
4949

5050
steps:
51-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
51+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5252

5353
- name: Clone test repository
54-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
54+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5555
with:
5656
repository: walbourn/directxtktest
5757
path: Tests

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
33

4-
cmake_minimum_required (VERSION 3.20)
4+
cmake_minimum_required (VERSION 3.21)
55

66
set(DIRECTXTK_VERSION 1.9.2)
77

CMakePresets.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": 2,
2+
"version": 3,
33
"configurePresets": [
44
{
55
"name": "base",
@@ -8,7 +8,7 @@
88
"generator": "Ninja",
99
"hidden": true,
1010
"binaryDir": "${sourceDir}/out/build/${presetName}",
11-
"cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" }
11+
"installDir": "${sourceDir}/out/install/${presetName}"
1212
},
1313

1414
{
@@ -164,12 +164,7 @@
164164
},
165165
{
166166
"name": "VCPKG",
167-
"cacheVariables": {
168-
"CMAKE_TOOLCHAIN_FILE": {
169-
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
170-
"type": "FILEPATH"
171-
}
172-
},
167+
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
173168
"hidden": true
174169
},
175170
{
@@ -347,6 +342,11 @@
347342
{ "name": "x86-Debug" , "configurePreset": "x86-Debug" },
348343
{ "name": "x86-Release" , "configurePreset": "x86-Release" },
349344

345+
{ "name": "x64-Debug-Win10" , "configurePreset": "x64-Debug-Win10" },
346+
{ "name": "x64-Release-Win10", "configurePreset": "x64-Release-Win10" },
347+
{ "name": "x86-Debug-Win10" , "configurePreset": "x86-Debug-Win10" },
348+
{ "name": "x86-Release-Win10", "configurePreset": "x86-Release-Win10" },
349+
350350
{ "name": "arm64-Debug" , "configurePreset": "arm64-Debug" },
351351
{ "name": "arm64-Release" , "configurePreset": "arm64-Release" },
352352
{ "name": "arm64ec-Debug" , "configurePreset": "arm64ec-Debug" },

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ FOR SECURITY ADVISORIES, see [GitHub](https://github.com/microsoft/DirectXTK/sec
7878

7979
For a full change history, see [CHANGELOG.md](https://github.com/microsoft/DirectXTK/blob/main/CHANGELOG.md).
8080

81+
* 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.
82+
8183
* Starting with the March 2025 release, Windows 7 and Windows 8.0 support has been retired. For _DirectX ToolKit for Audio_ this means that `DirectXTKAudio_Desktop_*_Win7` has been removed, and `DirectXTKAudio_Desktop_*_Win8` has been integrated into the `DirectXTK_Desktop_*` vcxproj which uses XAudio 2.8 for Windows 8.1 compatibility.
8284

8385
* Remove any References to or use of `DirectXTKAudio_Desktop_*_Win8.vcxproj` or `DirectXTKAudio_Desktop_*_Win7`. If using `DirectXTK_Desktop_*.vcxproj` you will be using XAudio 2.8 as before. Client code will need to build with `_WIN32_WINNT=0x0603`.

Src/LoaderHelpers.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
#include "DDSTextureLoader.h"
1717
#include "PlatformHelpers.h"
1818

19+
#include <algorithm>
20+
#include <cfloat>
21+
#include <cmath>
22+
#include <memory>
23+
#include <new>
24+
#include <tuple>
1925

2026
namespace DirectX
2127
{

Src/PlatformHelpers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#pragma warning(disable : 4324)
1515
#endif
1616

17+
#include <cstdio>
1718
#include <exception>
1819
#include <memory>
1920

0 commit comments

Comments
 (0)