Skip to content

Commit 76219fd

Browse files
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.
1 parent 12a36dc commit 76219fd

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎lib/vulkan.cmake‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,19 @@ endif()
161161
# Note that we only rely on the headers and do NOT link against the Vulkan libs!
162162

163163
if(NOT USING_PREBUILT_VULKAN)
164-
find_package(Vulkan 1.4.341 REQUIRED)
164+
# oldest version that shouldn't require code changes to support
165+
find_package(Vulkan 1.4.304 REQUIRED)
166+
167+
# shaderc ships separately from the Vulkan headers on most Linux distros
168+
find_path(SHADERC_INCLUDE_DIR shaderc/shaderc.h)
169+
170+
if(NOT SHADERC_INCLUDE_DIR)
171+
message(FATAL_ERROR
172+
"shaderc headers not found. Install them (Debian/Ubuntu: libshaderc-dev) or "
173+
"the Vulkan SDK, or configure with -DVULKAN_USE_PRECOMPILED=ON.")
174+
endif()
175+
176+
target_include_directories(Vulkan::Headers SYSTEM INTERFACE "${SHADERC_INCLUDE_DIR}")
165177
endif()
166178

167179
# prebuilt

0 commit comments

Comments
 (0)