mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-03-29 22:20:24 +00:00
Optionally allow the system installation of wayland-protocols to be used (#1966)
This commit is contained in:
parent
faeeb7ec57
commit
8d14e7c6f1
@ -129,8 +129,15 @@ endif()
|
||||
if(WAYLAND_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
|
||||
|
||||
GEN_WAYLAND("wayland-protocols" "unstable/xdg-output" xdg-output-unstable-v1)
|
||||
GEN_WAYLAND("wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
|
||||
if(NOT SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS)
|
||||
set(WAYLAND_PROTOCOLS_DIR "${CMAKE_SOURCE_DIR}/third-party/wayland-protocols")
|
||||
else()
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
pkg_check_modules(WAYLAND_PROTOCOLS wayland-protocols REQUIRED)
|
||||
endif()
|
||||
|
||||
GEN_WAYLAND("${WAYLAND_PROTOCOLS_DIR}" "unstable/xdg-output" xdg-output-unstable-v1)
|
||||
GEN_WAYLAND("${CMAKE_SOURCE_DIR}/third-party/wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
|
@ -5,17 +5,17 @@ macro(GEN_WAYLAND wayland_directory subdirectory filename)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src)
|
||||
|
||||
message("wayland-scanner private-code \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
|
||||
message("wayland-scanner client-header \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
|
||||
execute_process(
|
||||
COMMAND wayland-scanner private-code
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
|
||||
COMMAND wayland-scanner client-header
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.h
|
||||
|
||||
RESULT_VARIABLE EXIT_INT
|
||||
|
@ -5,6 +5,7 @@ option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignore
|
||||
option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON)
|
||||
|
||||
option(SUNSHINE_SYSTEM_MINIUPNP "Use system installation of MiniUPnP rather than the submodule." OFF)
|
||||
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
|
||||
|
||||
if(APPLE)
|
||||
option(SUNSHINE_CONFIGURE_PORTFILE
|
||||
|
Loading…
x
Reference in New Issue
Block a user