Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 04cff54

Browse files
committed
deps(vma): update to commit 62b1d32e96acf36f6da619d3f818d2edc7cbbc7b
1 parent 4799008 commit 04cff54

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎libgraphics/CMakeLists.txt‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,23 @@ endif()
7575
fetchcontent_declare(
7676
vma
7777
GIT_REPOSITORY https://github.com/YaaZ/VulkanMemoryAllocator-Hpp.git
78-
GIT_TAG da6ea76eecf12a1decc76f58a3e096bcc555bd94
78+
GIT_TAG 62b1d32e96acf36f6da619d3f818d2edc7cbbc7b
7979
)
8080
fetchcontent_getproperties(vma)
8181
if(NOT vma_POPULATED)
8282
message(STATUS "Populating vma")
8383
fetchcontent_populate(vma)
84-
add_library(VulkanMemoryAllocator STATIC ${vma_SOURCE_DIR}/include/vk_mem_alloc.h)
85-
set_source_files_properties(${vma_SOURCE_DIR}/include/vk_mem_alloc.h PROPERTIES LANGUAGE CXX)
86-
target_include_directories(VulkanMemoryAllocator SYSTEM PUBLIC ${vma_SOURCE_DIR}/include/)
87-
target_compile_definitions(VulkanMemoryAllocator PRIVATE VMA_IMPLEMENTATION)
84+
85+
if(NOT EXISTS ${vma_BINARY_DIR}/vk_mem_alloc.cpp)
86+
file(WRITE ${vma_BINARY_DIR}/vk_mem_alloc.cpp
87+
"#define VMA_IMPLEMENTATION\n#include \"vk_mem_alloc.h\""
88+
)
89+
endif()
90+
91+
add_library(VulkanMemoryAllocator STATIC ${vma_BINARY_DIR}/vk_mem_alloc.cpp)
92+
target_include_directories(
93+
VulkanMemoryAllocator SYSTEM PUBLIC ${vma_SOURCE_DIR}/VulkanMemoryAllocator/include/ ${vma_SOURCE_DIR}/include/
94+
)
8895
set_target_properties(VulkanMemoryAllocator PROPERTIES LINKER_LANGUAGE CXX)
8996
target_link_libraries(VulkanMemoryAllocator PUBLIC Vulkan::Vulkan)
9097
endif()

0 commit comments

Comments
 (0)