From b5409a0b414034dc62cac8a9969b206c5db00998 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Tue, 6 May 2025 15:32:51 +0200 Subject: [PATCH] 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. --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 47165b0..9f9aa34 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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)