[d3d12-memory-allocator] Update to 2.0.1 (#38095)

Updates to latest tagged release. Now uses the provided cmake file
instead of using a custom one (although a custom target file was added)

- [*] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [*] SHA512s are updated for each updated download.
- [*] The "supports" clause reflects platforms that may be fixed by this
new version.
- [*] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [*] Any patches that are no longer applied are deleted from the port's
directory.
- [*] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [*] Only one version is added to each modified port's versions file.
This commit is contained in:
Matthew Oliver 2024-04-12 00:57:16 +10:00 committed by GitHub
parent 94a48a4e09
commit 1d424272b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 64 additions and 32 deletions

View File

@ -0,0 +1,30 @@
diff --git a/configure b/configure
index 1f0b9497cb..3243e23021 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -40,8 +40,12 @@ D3D12MA_IMPORTS
)
endif()
-install(TARGETS D3D12MemoryAllocator DESTINATION "lib")
+install(TARGETS D3D12MemoryAllocator EXPORT d3d12-memory-allocator-config
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}")
install(FILES "${PROJECT_SOURCE_DIR}/include/D3D12MemAlloc.h" DESTINATION "include")
if(D3D12MA_BUILD_SAMPLE)
if(WIN32)
@@ -126,3 +130,11 @@ else()
message(STATUS "D3D12Sample application is not supported to Linux")
endif()
endif()
+
+target_include_directories(D3D12MemoryAllocator PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
+set_target_properties(D3D12MemoryAllocator PROPERTIES PUBLIC_HEADER "${PROJECT_SOURCE_DIR}/include/D3D12MemAlloc.h")
+
+install(
+ EXPORT d3d12-memory-allocator-config DESTINATION cmake/
+ NAMESPACE "unofficial::"
+)

View File

@ -0,0 +1,20 @@
diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp
index 2555ef6..e2d444e 100644
--- a/src/D3D12MemAlloc.cpp
+++ b/src/D3D12MemAlloc.cpp
@@ -7181,11 +7181,11 @@ void AllocatorPimpl::BuildStatsString(WCHAR** ppStatsString, BOOL detailedMap)
json.WriteString(m_AdapterDesc.Description);
json.WriteString(L"DedicatedVideoMemory");
- json.WriteNumber(m_AdapterDesc.DedicatedVideoMemory);
+ json.WriteNumber((UINT64)m_AdapterDesc.DedicatedVideoMemory);
json.WriteString(L"DedicatedSystemMemory");
- json.WriteNumber(m_AdapterDesc.DedicatedSystemMemory);
+ json.WriteNumber((UINT64)m_AdapterDesc.DedicatedSystemMemory);
json.WriteString(L"SharedSystemMemory");
- json.WriteNumber(m_AdapterDesc.SharedSystemMemory);
+ json.WriteNumber((UINT64)m_AdapterDesc.SharedSystemMemory);
json.WriteString(L"ResourceHeapTier");
json.WriteNumber(static_cast<UINT>(m_D3D12Options.ResourceHeapTier));

View File

@ -1,21 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(d3d12-memory-allocator)
add_library(${PROJECT_NAME} STATIC
"src/D3D12MemAlloc.h"
"src/D3D12MemAlloc.cpp"
)
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "src/D3D12MemAlloc.h")
target_include_directories(${PROJECT_NAME} INTERFACE PUBLIC $<INSTALL_INTERFACE:include>)
install(
TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-config
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION include/
)
install(
EXPORT ${PROJECT_NAME}-config DESTINATION cmake/
NAMESPACE "unofficial::"
)

View File

@ -1,15 +1,14 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator
REF 10f148cef0dfd34ae1a9373b9396beb1581c992a
SHA512 c99934a606ce5a5c9c59e05faf2e659bfad2e485b58aaf00f38219a6c89f17b62033f4a69935915f0d5269a4f0ecba41037b044913ae6f4077fa981eaab470c8
REF v${VERSION}
SHA512 99d81cad82fe8c78cfbc7a2a611d31e3bb38df55ac938aec289d1085be2ec46129c74dd2f56c850f257c43c6bd122913910fb9512029a1b3ab4a02f2ed327931
HEAD_REF master
PATCHES
0001-output-dirs.patch
0002-Fix-32b-compilation.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

View File

@ -1,9 +1,8 @@
{
"name": "d3d12-memory-allocator",
"version-date": "2021-05-05",
"port-version": 1,
"version": "2.0.1",
"description": "Easy to integrate D3d12 memory allocation library from GPUOpen",
"homepage": "https://gpuopen.com/gaming-product/d3d12-memory-allocator/",
"homepage": "https://gpuopen.com/d3d12-memory-allocator/",
"license": "MIT",
"supports": "windows",
"dependencies": [

View File

@ -2121,8 +2121,8 @@
"port-version": 4
},
"d3d12-memory-allocator": {
"baseline": "2021-05-05",
"port-version": 1
"baseline": "2.0.1",
"port-version": 0
},
"d3dx12": {
"baseline": "may2021",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b61a78756887ebcc5718bc7a32b8531fdc970d91",
"version": "2.0.1",
"port-version": 0
},
{
"git-tree": "7ada5dd1ad2d93ae0c4d56924dfaea88f8fc0e55",
"version-date": "2021-05-05",