From 0313543c06375105ec2085e037d5f155e1ed8f54 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Fri, 9 Oct 2026 21:30:30 +0200 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a47ff1..7196784 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,13 @@ if(VULKANENGINE_FETCH_DEPS) FetchContent_Declare(VulkanHeaders GIT_REPOSITORY https://github.com/KhronosGroup/Vulkan-Headers.git GIT_TAG v1.4.309) + # vulkan/vk_enum_string_helper.h lives here, not in Vulkan-Headers. + # SOURCE_SUBDIR points to a nonexistent dir so MakeAvailable only downloads + # (we use the checked-in header, no need to run its CMake). + FetchContent_Declare(VulkanUtilityLibraries + GIT_REPOSITORY https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git + GIT_TAG v1.4.309 + SOURCE_SUBDIR _no_cmake) FetchContent_Declare(volk GIT_REPOSITORY https://github.com/zeux/volk.git GIT_TAG 1.4.304) @@ -131,7 +138,7 @@ if(VULKANENGINE_FETCH_DEPS) GIT_TAG 3.4) FetchContent_Declare(vk-bootstrap GIT_REPOSITORY https://github.com/charles-lunarg/vk-bootstrap.git - GIT_TAG v1.4.365) + GIT_TAG v1.4.309) FetchContent_Declare(fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_TAG 11.0.2) @@ -146,11 +153,16 @@ if(VULKANENGINE_FETCH_DEPS) GIT_TAG v3.10.1) # Vulkan headers first: vk-bootstrap and volk pick up Vulkan::Headers - FetchContent_MakeAvailable(VulkanHeaders) + FetchContent_MakeAvailable(VulkanHeaders VulkanUtilityLibraries) FetchContent_MakeAvailable(volk VMA glfw vk-bootstrap fmt CLI11 glm simdjson) target_link_libraries(volk PUBLIC Vulkan::Headers) + add_library(vk_utility_headers INTERFACE) + target_include_directories(vk_utility_headers SYSTEM INTERFACE + ${vulkanutilitylibraries_SOURCE_DIR}/include) + target_link_libraries(vk_utility_headers INTERFACE Vulkan::Headers) + else() # Nix path find_package( volk CONFIG REQUIRED ) @@ -404,6 +416,7 @@ if(VULKANENGINE_FETCH_DEPS) list(APPEND lib_list volk Vulkan::Headers + vk_utility_headers GPUOpen::VulkanMemoryAllocator glm::glm-header-only simdjson::simdjson