diff --git a/ports/d3d12-memory-allocator/0001-build-options.patch b/ports/d3d12-memory-allocator/0001-build-options.patch new file mode 100644 index 0000000000..fe94e8bc76 --- /dev/null +++ b/ports/d3d12-memory-allocator/0001-build-options.patch @@ -0,0 +1,35 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 34fcecd..d796333 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -26,14 +26,16 @@ set_target_properties( + MINSIZEREL_POSTFIX "s" + ) + ++find_package(directx-headers CONFIG REQUIRED) ++ ++target_compile_definitions(D3D12MemoryAllocator PUBLIC D3D12MA_USING_DIRECTX_HEADERS) ++ + target_include_directories(D3D12MemoryAllocator PUBLIC + $ $ + ) + + target_link_libraries(D3D12MemoryAllocator PUBLIC +- d3d12.lib +- dxgi.lib +- dxguid.lib ++ Microsoft::DirectX-Headers Microsoft::DirectX-Guids d3d12.lib dxgi.lib + ) + + if(BUILD_SHARED_LIBS) +diff --git a/src/cmake/config.cmake.in b/src/cmake/config.cmake.in +index 3e47daa..08de2e8 100644 +--- a/src/cmake/config.cmake.in ++++ b/src/cmake/config.cmake.in +@@ -1,3 +1,4 @@ + include(CMakeFindDependencyMacro) ++find_dependency(directx-headers CONFIG) + +-include("${CMAKE_CURRENT_LIST_DIR}/@D3D12MA_TARGETS_EXPORT_NAME@.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/@D3D12MA_TARGETS_EXPORT_NAME@.cmake") +\ No newline at end of file diff --git a/ports/d3d12-memory-allocator/0001-output-dirs.patch b/ports/d3d12-memory-allocator/0001-output-dirs.patch deleted file mode 100644 index 47d1d8f2d9..0000000000 --- a/ports/d3d12-memory-allocator/0001-output-dirs.patch +++ /dev/null @@ -1,30 +0,0 @@ -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 $ $) -+set_target_properties(D3D12MemoryAllocator PROPERTIES PUBLIC_HEADER "${PROJECT_SOURCE_DIR}/include/D3D12MemAlloc.h") -+ -+install( -+ EXPORT d3d12-memory-allocator-config DESTINATION cmake/ -+ NAMESPACE "unofficial::" -+) diff --git a/ports/d3d12-memory-allocator/0002-Fix-32b-compilation.patch b/ports/d3d12-memory-allocator/0002-Fix-32b-compilation.patch deleted file mode 100644 index dcdd73d49b..0000000000 --- a/ports/d3d12-memory-allocator/0002-Fix-32b-compilation.patch +++ /dev/null @@ -1,20 +0,0 @@ -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(m_D3D12Options.ResourceHeapTier)); - diff --git a/ports/d3d12-memory-allocator/portfile.cmake b/ports/d3d12-memory-allocator/portfile.cmake index 942e92fb46..04b59aca9f 100644 --- a/ports/d3d12-memory-allocator/portfile.cmake +++ b/ports/d3d12-memory-allocator/portfile.cmake @@ -2,11 +2,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator REF v${VERSION} - SHA512 99d81cad82fe8c78cfbc7a2a611d31e3bb38df55ac938aec289d1085be2ec46129c74dd2f56c850f257c43c6bd122913910fb9512029a1b3ab4a02f2ed327931 + SHA512 58d44aa021a04c1fa82cf5ff76420de43091d5475da9c23975176058990e0e3e1106aa13042ea6e75d29dd71f821b5431f9f12b62fba5e58955aa30127b4221b HEAD_REF master - PATCHES - 0001-output-dirs.patch - 0002-Fix-32b-compilation.patch + PATCHES "0001-build-options.patch" ) vcpkg_cmake_configure( @@ -15,7 +13,10 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH cmake/) +vcpkg_cmake_config_fixup( + PACKAGE_NAME D3D12MemoryAllocator + CONFIG_PATH share/cmake/D3D12MemoryAllocator/ +) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/ports/d3d12-memory-allocator/vcpkg.json b/ports/d3d12-memory-allocator/vcpkg.json index 8cd975176d..713f626d14 100644 --- a/ports/d3d12-memory-allocator/vcpkg.json +++ b/ports/d3d12-memory-allocator/vcpkg.json @@ -1,6 +1,6 @@ { "name": "d3d12-memory-allocator", - "version": "2.0.1", + "version": "3.0.1", "description": "Easy to integrate D3d12 memory allocation library from GPUOpen", "homepage": "https://gpuopen.com/d3d12-memory-allocator/", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index c5a09467e4..9b14fbd1c1 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2229,7 +2229,7 @@ "port-version": 4 }, "d3d12-memory-allocator": { - "baseline": "2.0.1", + "baseline": "3.0.1", "port-version": 0 }, "d3dx12": { diff --git a/versions/d-/d3d12-memory-allocator.json b/versions/d-/d3d12-memory-allocator.json index b80ffa1a24..13d7b90fae 100644 --- a/versions/d-/d3d12-memory-allocator.json +++ b/versions/d-/d3d12-memory-allocator.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1eb283d295a0a125ab901f2811ef1fd5520446e0", + "version": "3.0.1", + "port-version": 0 + }, { "git-tree": "b61a78756887ebcc5718bc7a32b8531fdc970d91", "version": "2.0.1",