From 675553a9defd84e4e5c15aef0114b2fd53d76621 Mon Sep 17 00:00:00 2001 From: Tobias Frisch <tfrisch@uni-koblenz.de> Date: Sun, 17 Apr 2022 00:52:39 +0200 Subject: [PATCH] Adjusted cmake config for VMA to work with other forks as well Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de> --- config/lib/VulkanMemoryAllocator.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/lib/VulkanMemoryAllocator.cmake b/config/lib/VulkanMemoryAllocator.cmake index 2a11f936..fcde834d 100644 --- a/config/lib/VulkanMemoryAllocator.cmake +++ b/config/lib/VulkanMemoryAllocator.cmake @@ -2,7 +2,11 @@ use_git_submodule("${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" vma_hpp_status) if (${vma_hpp_status}) - set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" CACHE INTERNAL "") + if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp/include") + set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp/include" CACHE INTERNAL "") + else() + set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" CACHE INTERNAL "") + endif() set(VMA_RECORDING_ENABLED OFF CACHE INTERNAL "") set(VMA_USE_STL_CONTAINERS OFF CACHE INTERNAL "") @@ -16,7 +20,7 @@ if (${vma_hpp_status}) add_subdirectory(${vkcv_config_lib}/vma) list(APPEND vkcv_libraries VulkanMemoryAllocator) - list(APPEND vkcv_includes ${vkcv_lib_path}/VulkanMemoryAllocator-Hpp) + list(APPEND vkcv_includes ${VMA_HPP_PATH}) message(${vkcv_config_msg} " VMA - ") endif () -- GitLab