aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/d3d12-memory-allocator/0001-build-options.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/d3d12-memory-allocator/0001-build-options.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/d3d12-memory-allocator/0001-build-options.patch')
-rw-r--r--vcpkg/ports/d3d12-memory-allocator/0001-build-options.patch35
1 files changed, 35 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