build(deps): Add SUNSHINE_SYSTEM_VULKAN_HEADERS option (#5103)
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
@@ -122,8 +122,14 @@ endif()
|
|||||||
|
|
||||||
# vulkan video encoding (via FFmpeg)
|
# vulkan video encoding (via FFmpeg)
|
||||||
if(${SUNSHINE_ENABLE_VULKAN})
|
if(${SUNSHINE_ENABLE_VULKAN})
|
||||||
# use Vulkan headers from build-deps submodule (system headers may be too old, e.g. Ubuntu 22.04)
|
if(NOT SUNSHINE_SYSTEM_VULKAN_HEADERS)
|
||||||
set(VULKAN_HEADERS_DIR "${CMAKE_SOURCE_DIR}/third-party/build-deps/third-party/FFmpeg/Vulkan-Headers/include")
|
# 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")
|
||||||
|
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()
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user