From c61770a16226e5d477643f030bf83bf5e49fc2d6 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Wed, 5 Jan 2022 18:41:51 +0100 Subject: [PATCH] Fixed CMakeLists.txt regarding VMA_DYNAMIC_VULKAN_FUNCTIONS, VMA_STATIC_VULKAN_FUNCTIONS Closes #218 --- src/CMakeLists.txt | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f899312..a5e751b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,20 +26,8 @@ set_target_properties( target_include_directories(VulkanMemoryAllocator PUBLIC "${PROJECT_SOURCE_DIR}/include") -if(${VMA_DYNAMIC_VULKAN_FUNCTIONS}) - set(VULKAN_USE_DYNAMIC ${VMA_DYNAMIC_VULKAN_FUNCTIONS}) -else() - set(VULKAN_USE_DYNAMIC 0) -endif() - -if(${VMA_STATIC_VULKAN_FUNCTIONS}) - set(VULKAN_USE_STATIC ${VMA_STATIC_VULKAN_FUNCTIONS}) -else() - set(VULKAN_USE_STATIC 1) -endif() - # Only link to Vulkan if static linking is used -if(${VULKAN_USE_STATIC}) +if(${VMA_STATIC_VULKAN_FUNCTIONS}) target_link_libraries(VulkanMemoryAllocator PUBLIC Vulkan::Vulkan) endif() @@ -47,8 +35,8 @@ target_compile_definitions( VulkanMemoryAllocator PUBLIC - VMA_STATIC_VULKAN_FUNCTIONS=$ - VMA_DYNAMIC_VULKAN_FUNCTIONS=$ + VMA_STATIC_VULKAN_FUNCTIONS=$ + VMA_DYNAMIC_VULKAN_FUNCTIONS=$ VMA_DEBUG_ALWAYS_DEDICATED_MEMORY=$ VMA_DEBUG_INITIALIZE_ALLOCATIONS=$ VMA_DEBUG_GLOBAL_MUTEX=$