Link VulkanMemoryAllocator to Vulkan only if static linking is enabled

This commit is contained in:
Johannes Schneider 2021-06-02 00:23:57 +02:00
parent 8111c12b36
commit 191c64c8ee
No known key found for this signature in database
GPG Key ID: 630166982479CCF3

View File

@ -15,12 +15,10 @@ set_target_properties(
target_include_directories(VulkanMemoryAllocator PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_link_libraries(
VulkanMemoryAllocator
PUBLIC
Vulkan::Vulkan
)
# Only link to Vulkan if static linking is used
if (NOT ${VMA_DYNAMIC_VULKAN_FUNCTIONS})
target_link_libraries(VulkanMemoryAllocator PUBLIC Vulkan::Vulkan)
endif()
target_compile_definitions(
VulkanMemoryAllocator