Merge remote-tracking branch 'origin/master'

This commit is contained in:
Yukino Song
2024-10-26 21:04:50 +08:00
32 changed files with 679 additions and 96 deletions

View File

@@ -67,6 +67,11 @@ if(${SUNSHINE_ENABLE_CUDA})
# message(STATUS "CUDA NVCC Flags: ${CUDA_NVCC_FLAGS}")
message(STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES}")
elseif(${CUDA_FAIL_ON_MISSING})
message(FATAL_ERROR
"CUDA not found.
If this is intentional, set '-DSUNSHINE_ENABLE_CUDA=OFF' or '-DCUDA_FAIL_ON_MISSING=OFF'"
)
endif()
endif()
if(CUDA_FOUND)
@@ -82,8 +87,8 @@ endif()
# drm
if(${SUNSHINE_ENABLE_DRM})
find_package(LIBDRM)
find_package(LIBCAP)
find_package(LIBDRM REQUIRED)
find_package(LIBCAP REQUIRED)
else()
set(LIBDRM_FOUND OFF)
set(LIBCAP_FOUND OFF)
@@ -95,10 +100,6 @@ if(LIBDRM_FOUND AND LIBCAP_FOUND)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
elseif(NOT LIBDRM_FOUND)
message(WARNING "Missing libdrm")
elseif(NOT LIBDRM_FOUND)
message(WARNING "Missing libcap")
endif()
# evdev
@@ -106,7 +107,7 @@ include(dependencies/libevdev_Sunshine)
# vaapi
if(${SUNSHINE_ENABLE_VAAPI})
find_package(Libva)
find_package(Libva REQUIRED)
else()
set(LIBVA_FOUND OFF)
endif()
@@ -121,7 +122,7 @@ endif()
# wayland
if(${SUNSHINE_ENABLE_WAYLAND})
find_package(Wayland)
find_package(Wayland REQUIRED)
else()
set(WAYLAND_FOUND OFF)
endif()
@@ -153,7 +154,7 @@ endif()
# x11
if(${SUNSHINE_ENABLE_X11})
find_package(X11)
find_package(X11 REQUIRED)
else()
set(X11_FOUND OFF)
endif()
@@ -187,10 +188,9 @@ if(${SUNSHINE_ENABLE_TRAY})
endif()
pkg_check_modules(LIBNOTIFY libnotify)
if(NOT APPINDICATOR_FOUND OR NOT LIBNOTIFY_FOUND)
set(SUNSHINE_TRAY 0)
message(WARNING "Missing appindicator or libnotify, disabling tray icon")
message(STATUS "APPINDICATOR_FOUND: ${APPINDICATOR_FOUND}")
message(STATUS "LIBNOTIFY_FOUND: ${LIBNOTIFY_FOUND}")
message(FATAL_ERROR "Couldn't find either appindicator or libnotify")
else()
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
@@ -203,10 +203,6 @@ else()
message(STATUS "Tray icon disabled")
endif()
if(${SUNSHINE_ENABLE_TRAY} AND ${SUNSHINE_TRAY} EQUAL 0 AND SUNSHINE_REQUIRE_TRAY)
message(FATAL_ERROR "Tray icon is required")
endif()
if(${SUNSHINE_USE_LEGACY_INPUT}) # TODO: Remove this legacy option after the next stable release
list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/src/platform/linux/input/legacy_input.cpp")
else()

View File

@@ -27,7 +27,7 @@ if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
if(WIN32)
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
elseif(UNIX AND NOT APPLE)
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 vdpau X11)
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11)
endif()
set(FFMPEG_PREPARED_BINARIES
"${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")

View File

@@ -51,7 +51,6 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
libpulse0, \
libva2, \
libva-drm2, \
libvdpau1, \
libwayland-client0, \
libx11-6, \
miniupnpc, \
@@ -64,7 +63,6 @@ set(CPACK_RPM_PACKAGE_REQUIRES "\
libevdev >= 1.5.6, \
libopusenc >= 0.2.1, \
libva >= 2.14.0, \
libvdpau >= 1.5, \
libwayland-client >= 1.20.0, \
libX11 >= 1.7.3.1, \
miniupnpc >= 2.2.4, \

View File

@@ -22,7 +22,6 @@ option(BUILD_WERROR "Enable -Werror flag." OFF)
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON)
option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON)
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
@@ -32,6 +31,7 @@ else()
option(BOOST_USE_STATIC "Use static boost libraries." ON)
endif()
option(CUDA_FAIL_ON_MISSING "Fail the build if CUDA is not found." ON)
option(CUDA_INHERIT_COMPILE_OPTIONS
"When building CUDA code, inherit compile options from the the main project. You may want to disable this if
your IDE throws errors about unknown flags after running cmake." ON)