mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-12-06 07:11:44 +01:00
Upgrade to CMake 3.21 (#631)
This commit is contained in:
parent
f32f30d9b0
commit
dafb841055
@ -1,7 +1,7 @@
|
|||||||
# Copyright (c) Microsoft Corporation.
|
# Copyright (c) Microsoft Corporation.
|
||||||
# Licensed under the MIT License.
|
# Licensed under the MIT License.
|
||||||
|
|
||||||
cmake_minimum_required (VERSION 3.20)
|
cmake_minimum_required (VERSION 3.21)
|
||||||
|
|
||||||
set(DIRECTXTEX_VERSION 2.0.8)
|
set(DIRECTXTEX_VERSION 2.0.8)
|
||||||
|
|
||||||
@ -509,13 +509,11 @@ if(BUILD_TOOLS AND WIN32)
|
|||||||
target_compile_definitions(texconv PRIVATE USE_XBOX_EXTS)
|
target_compile_definitions(texconv PRIVATE USE_XBOX_EXTS)
|
||||||
target_link_libraries(texconv PUBLIC $<TARGET_NAME_IF_EXISTS:Xbox::GDKX> $<TARGET_NAME_IF_EXISTS:Xbox::XDK>)
|
target_link_libraries(texconv PUBLIC $<TARGET_NAME_IF_EXISTS:Xbox::GDKX> $<TARGET_NAME_IF_EXISTS:Xbox::XDK>)
|
||||||
|
|
||||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.21")
|
add_custom_command(TARGET texconv POST_BUILD
|
||||||
add_custom_command(TARGET texconv POST_BUILD
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy
|
$<TARGET_RUNTIME_DLLS:texconv> $<TARGET_FILE_DIR:texconv>
|
||||||
$<TARGET_RUNTIME_DLLS:texconv> $<TARGET_FILE_DIR:texconv>
|
COMMAND_EXPAND_LISTS
|
||||||
COMMAND_EXPAND_LISTS
|
)
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 3,
|
||||||
"configurePresets": [
|
"configurePresets": [
|
||||||
{
|
{
|
||||||
"name": "base",
|
"name": "base",
|
||||||
@ -8,7 +8,7 @@
|
|||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||||
"cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" }
|
"installDir": "${sourceDir}/out/install/${presetName}"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -183,12 +183,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VCPKG",
|
"name": "VCPKG",
|
||||||
"cacheVariables": {
|
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||||
"CMAKE_TOOLCHAIN_FILE": {
|
|
||||||
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
|
||||||
"type": "FILEPATH"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -325,7 +325,7 @@ namespace
|
|||||||
_Inout_ uint32_t& convFlags) noexcept
|
_Inout_ uint32_t& convFlags) noexcept
|
||||||
{
|
{
|
||||||
if (!pSource)
|
if (!pSource)
|
||||||
return E_INVALIDARG;
|
return E_POINTER;
|
||||||
|
|
||||||
metadata = {};
|
metadata = {};
|
||||||
if (ddPixelFormat)
|
if (ddPixelFormat)
|
||||||
|
|||||||
@ -27,7 +27,7 @@ static_assert(WIN10_DXGI_FORMAT_V208 == DXGI_FORMAT_V208, "Windows SDK mismatch
|
|||||||
static_assert(WIN10_DXGI_FORMAT_V408 == DXGI_FORMAT_V408, "Windows SDK mismatch detected");
|
static_assert(WIN10_DXGI_FORMAT_V408 == DXGI_FORMAT_V408, "Windows SDK mismatch detected");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NTDDI_WIN11_GE) && !defined(_GAMING_XBOX)
|
#if defined(NTDDI_WIN11_GE) && !defined(_GAMING_XBOX) && !defined(__MINGW32__)
|
||||||
static_assert(WIN11_DXGI_FORMAT_A4B4G4R4_UNORM == DXGI_FORMAT_A4B4G4R4_UNORM, "Windows SDK mismatch detected");
|
static_assert(WIN11_DXGI_FORMAT_A4B4G4R4_UNORM == DXGI_FORMAT_A4B4G4R4_UNORM, "Windows SDK mismatch detected");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -83,6 +83,8 @@ FOR SECURITY ADVISORIES, see [GitHub](https://github.com/microsoft/DirectXTex/se
|
|||||||
|
|
||||||
For a full change history, see [CHANGELOG.md](https://github.com/microsoft/DirectXTex/blob/main/CHANGELOG.md).
|
For a full change history, see [CHANGELOG.md](https://github.com/microsoft/DirectXTex/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 March 2025 release, Windows 7 and Windows 8.0 support has been retired.
|
* Starting with the March 2025 release, Windows 7 and Windows 8.0 support has been retired.
|
||||||
|
|
||||||
* Starting with the July 2022 release, the ``bool forceSRGB`` parameter for the **CreateTextureEx** and **CreateShaderResourceViewEx** functions is now a ``CREATETEX_FLAGS`` typed enum bitmask flag parameter. This may have a _breaking change_ impact to client code. Replace ``true`` with ``CREATETEX_FORCE_SRGB`` and ``false`` with ``CREATETEX_DEFAULT``.
|
* Starting with the July 2022 release, the ``bool forceSRGB`` parameter for the **CreateTextureEx** and **CreateShaderResourceViewEx** functions is now a ``CREATETEX_FLAGS`` typed enum bitmask flag parameter. This may have a _breaking change_ impact to client code. Replace ``true`` with ``CREATETEX_FORCE_SRGB`` and ``false`` with ``CREATETEX_DEFAULT``.
|
||||||
|
|||||||
@ -3856,7 +3856,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
{
|
{
|
||||||
options.pstrName = const_cast<wchar_t*>(L"HeifCompressionMethod");
|
options.pstrName = const_cast<wchar_t*>(L"HeifCompressionMethod");
|
||||||
varValues.vt = VT_UI1;
|
varValues.vt = VT_UI1;
|
||||||
#if defined(NTDDI_WIN10_CU)
|
#if defined(NTDDI_WIN10_CU) && !defined(__MINGW32__)
|
||||||
varValues.bVal = WICHeifCompressionNone;
|
varValues.bVal = WICHeifCompressionNone;
|
||||||
#else
|
#else
|
||||||
varValues.bVal = 0x1 /* WICHeifCompressionNone */;
|
varValues.bVal = 0x1 /* WICHeifCompressionNone */;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user