diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/d3d12-memory-allocator | |
Diffstat (limited to 'vcpkg/ports/d3d12-memory-allocator')
| -rw-r--r-- | vcpkg/ports/d3d12-memory-allocator/0001-build-options.patch | 35 | ||||
| -rw-r--r-- | vcpkg/ports/d3d12-memory-allocator/portfile.cmake | 22 | ||||
| -rw-r--r-- | vcpkg/ports/d3d12-memory-allocator/vcpkg.json | 19 |
3 files changed, 76 insertions, 0 deletions
diff --git a/vcpkg/ports/d3d12-memory-allocator/0001-build-options.patch b/vcpkg/ports/d3d12-memory-allocator/0001-build-options.patch new file mode 100644 index 0000000..fe94e8b --- /dev/null +++ b/vcpkg/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
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:./include>
+ )
+
+ 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/vcpkg/ports/d3d12-memory-allocator/portfile.cmake b/vcpkg/ports/d3d12-memory-allocator/portfile.cmake new file mode 100644 index 0000000..04b59ac --- /dev/null +++ b/vcpkg/ports/d3d12-memory-allocator/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator
+ REF v${VERSION}
+ SHA512 58d44aa021a04c1fa82cf5ff76420de43091d5475da9c23975176058990e0e3e1106aa13042ea6e75d29dd71f821b5431f9f12b62fba5e58955aa30127b4221b
+ HEAD_REF master
+ PATCHES "0001-build-options.patch"
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+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/vcpkg/ports/d3d12-memory-allocator/vcpkg.json b/vcpkg/ports/d3d12-memory-allocator/vcpkg.json new file mode 100644 index 0000000..713f626 --- /dev/null +++ b/vcpkg/ports/d3d12-memory-allocator/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "d3d12-memory-allocator", + "version": "3.0.1", + "description": "Easy to integrate D3d12 memory allocation library from GPUOpen", + "homepage": "https://gpuopen.com/d3d12-memory-allocator/", + "license": "MIT", + "supports": "windows", + "dependencies": [ + "directx-headers", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |