lower Vulkan requirement and fix shaderc includes (#7902)

Lower Vulkan version requirement to 1.4.304, which should be the lowest
version supported without requiring code changes. This should also offer
out of the box support on current Linux distros, such as Debian 13 (trixie)
and Ubuntu 25.10 (questing) & 26.04 (resolute).

Also make sure that the shaderc headers are available and added to the
include path on Linux when using system libraries.
This commit is contained in:
Taylor Richards authored and GitHub committed 2026-10-18 05:53:10 -04:00
1 parent 12a36dc1a3
commit 76219fd1e2
1 file changed
+13 -1
+13 -1
View File
@@ -161,7 +161,19 @@ endif()
# 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 REQUIRED)
# oldest version that shouldn't require code changes to support
find_package(Vulkan 1.4.304 REQUIRED)
# shaderc ships separately from the Vulkan headers on most Linux distros
find_path(SHADERC_INCLUDE_DIR shaderc/shaderc.h)
if(NOT SHADERC_INCLUDE_DIR)
message(FATAL_ERROR
"shaderc headers not found. Install them (Debian/Ubuntu: libshaderc-dev) or "
"the Vulkan SDK, or configure with -DVULKAN_USE_PRECOMPILED=ON.")
endif()
target_include_directories(Vulkan::Headers SYSTEM INTERFACE "${SHADERC_INCLUDE_DIR}")
endif()
# prebuilt