Skip to content

Commit b5409a0

Browse files
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.
1 parent 2fd73c3 commit b5409a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ target_sources(VmaSample PRIVATE
5656
../include/vk_mem_alloc.h
5757
)
5858

59-
# Only link to Vulkan library if static linking is used, but always add Vulkan headers directory
60-
if(VMA_STATIC_VULKAN_FUNCTIONS)
59+
# Only link to Vulkan library if volk loader is not used, but always add Vulkan headers directory.
60+
if("${VMA_VOLK_HEADER_PATH}" STREQUAL "")
6161
target_link_libraries(VmaSample PUBLIC Vulkan::Vulkan)
6262
else()
6363
target_link_libraries(VmaSample PUBLIC Vulkan::Headers)

0 commit comments

Comments
 (0)