build(deps): Add SUNSHINE_SYSTEM_VULKAN_HEADERS option (#5103)

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
James Le Cuirot
2026-05-13 02:19:07 +01:00
committed by GitHub
parent dfffc8a86e
commit 07099901cd
2 changed files with 9 additions and 2 deletions

View File

@@ -122,8 +122,14 @@ endif()
# vulkan video encoding (via FFmpeg) # vulkan video encoding (via FFmpeg)
if(${SUNSHINE_ENABLE_VULKAN}) if(${SUNSHINE_ENABLE_VULKAN})
if(NOT SUNSHINE_SYSTEM_VULKAN_HEADERS)
# use Vulkan headers from build-deps submodule (system headers may be too old, e.g. Ubuntu 22.04) # use Vulkan headers from build-deps submodule (system headers may be too old, e.g. Ubuntu 22.04)
set(VULKAN_HEADERS_DIR "${CMAKE_SOURCE_DIR}/third-party/build-deps/third-party/FFmpeg/Vulkan-Headers/include") set(VULKAN_HEADERS_DIR "${CMAKE_SOURCE_DIR}/third-party/build-deps/third-party/FFmpeg/Vulkan-Headers/include")
else()
find_package(VulkanHeaders REQUIRED)
get_target_property(VULKAN_HEADERS_DIR Vulkan::Headers INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(NOT EXISTS "${VULKAN_HEADERS_DIR}/vulkan/vulkan.h") if(NOT EXISTS "${VULKAN_HEADERS_DIR}/vulkan/vulkan.h")
message(FATAL_ERROR "Vulkan headers not found in build-deps submodule") message(FATAL_ERROR "Vulkan headers not found in build-deps submodule")
endif() endif()

View File

@@ -18,6 +18,7 @@ option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon." ON) option(SUNSHINE_ENABLE_TRAY "Enable system tray icon." ON)
option(SUNSHINE_SYSTEM_VULKAN_HEADERS "Use system installation of vulkan-headers rather than the submodule." OFF)
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF) option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
if(APPLE) if(APPLE)