From b75e0c4902fcddf36bb4b57d8c755647be7a649c Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Tue, 15 Sep 2026 11:30:00 -0400 Subject: [PATCH] fix prebuilt lib requirement for vulkan If prebuilt Vulkan was disabled, but a system-wide Vulkan install wasn't found, then a fallback was available using prebuilt libs. Unfortunately this does ultimately require the prebuilt libs be available which isn't always wanted (or possible), so drop the fallback and just require Vulkan instead. Fixes #7786 --- lib/vulkan.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/vulkan.cmake b/lib/vulkan.cmake index 2e705d27ea2..6d451cafa83 100644 --- a/lib/vulkan.cmake +++ b/lib/vulkan.cmake @@ -93,8 +93,6 @@ endif () option(VULKAN_USE_PRECOMPILED "Force use of precompiled versions of Vulkan-Loader and Shaderc." OFF) -get_prebuilt_path(PREBUILT_PATH) - set(USING_PREBUILT_VULKAN ${VULKAN_USE_PRECOMPILED}) if(PLATFORM_WINDOWS OR PLATFORM_MAC) @@ -103,6 +101,10 @@ elseif(PLATFORM_LINUX AND FSO_BUILD_APPIMAGE) set(USING_PREBUILT_VULKAN TRUE) endif() +if(USING_PREBUILT_VULKAN) + get_prebuilt_path(PREBUILT_PATH) +endif() + # Shaderc - runtime compilation of glsl to SPIRV # # This is dynamically loaded, so we don't have to link against it. That also @@ -154,15 +156,15 @@ endif() # Vulkan/Shaderc headers # -# Use prebuilt if we should, or just as a fallback if the SDK isn't installed. +# Use prebuilt if we should, otherwise require that the headers/loader be available. # The find_package() min version should be what is used in the prebuilt repo. # Note that we only rely on the headers and do NOT link against the Vulkan libs! if(NOT USING_PREBUILT_VULKAN) - find_package(Vulkan 1.4.341) + find_package(Vulkan 1.4.341 REQUIRED) endif() -# prebuilt/fallback +# prebuilt if(NOT TARGET Vulkan::Headers) add_library(VulkanHeaders INTERFACE)