Fixed Cmake script for cases when VMA_STATIC_VULKAN_FUNCTIONS is not set

We need to statically link with Vulkan anyway, unless we use volk. VMA doesn't need it, but sample app does. Without this change, we had linker errors.
This commit is contained in:
Adam Sawicki 2025-05-06 15:32:51 +02:00
parent 2fd73c38a1
commit b5409a0b41

View file

@ -56,8 +56,8 @@ target_sources(VmaSample PRIVATE
../include/vk_mem_alloc.h
)
# Only link to Vulkan library if static linking is used, but always add Vulkan headers directory
if(VMA_STATIC_VULKAN_FUNCTIONS)
# Only link to Vulkan library if volk loader is not used, but always add Vulkan headers directory.
if("${VMA_VOLK_HEADER_PATH}" STREQUAL "")
target_link_libraries(VmaSample PUBLIC Vulkan::Vulkan)
else()
target_link_libraries(VmaSample PUBLIC Vulkan::Headers)