blob: 7fa8141dfb3a929b2895062d60eea6fa02e87dea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
From b1e2554836b6e3018c950bfb172930fe85ccdd09 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Sat, 30 May 2026 23:03:13 +0100
Subject: [PATCH 1/2] build(deps): libcap is mandatory on Linux now
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
--- a/cmake/compile_definitions/linux.cmake
+++ b/cmake/compile_definitions/linux.cmake
@@ -89,22 +89,18 @@ endif()
if(LIBDRM_FOUND)
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS})
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
+ if(${SUNSHINE_ENABLE_DRM})
+ add_compile_definitions(SUNSHINE_BUILD_DRM)
+ list(APPEND PLATFORM_TARGET_FILES
+ "${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
+ list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
+ endif()
endif()
-# drm
-if(${SUNSHINE_ENABLE_DRM})
- find_package(LIBCAP REQUIRED)
-else()
- set(LIBCAP_FOUND OFF)
-endif()
-if(LIBDRM_FOUND AND LIBCAP_FOUND)
- add_compile_definitions(SUNSHINE_BUILD_DRM)
- include_directories(SYSTEM ${LIBCAP_INCLUDE_DIRS})
- list(APPEND PLATFORM_LIBRARIES ${LIBCAP_LIBRARIES})
- list(APPEND PLATFORM_TARGET_FILES
- "${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
- list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
-endif()
+# Capabilities
+find_package(LIBCAP REQUIRED)
+include_directories(SYSTEM ${LIBCAP_INCLUDE_DIRS})
+list(APPEND PLATFORM_LIBRARIES ${LIBCAP_LIBRARIES})
# evdev
include(dependencies/libevdev_Sunshine)
--
2.54.0
From 896ab0480a204d0fa620e2bf6ba696630896eb87 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Sat, 30 May 2026 23:26:18 +0100
Subject: [PATCH 2/2] build(deps): fix use of libdrm headers when DRM capture
is disabled
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
--- a/cmake/compile_definitions/linux.cmake
+++ b/cmake/compile_definitions/linux.cmake
@@ -80,16 +80,18 @@ if(CUDA_FOUND)
add_compile_definitions(SUNSHINE_BUILD_CUDA)
endif()
-# libdrm is required for DRM (KMS), KWin ScreenCast and Wayland
-if(${SUNSHINE_ENABLE_DRM} OR ${SUNSHINE_ENABLE_KWIN} OR ${SUNSHINE_ENABLE_WAYLAND})
+# libdrm is required for DRM (KMS). Only the headers are required for Wayland,
+# Vulkan, and PipeWire (KWin, Portal).
+if(${SUNSHINE_ENABLE_DRM} OR ${SUNSHINE_ENABLE_WAYLAND} OR ${SUNSHINE_ENABLE_VULKAN}
+ OR ${SUNSHINE_ENABLE_KWIN} OR ${SUNSHINE_ENABLE_PORTAL})
find_package(LIBDRM REQUIRED)
else()
set(LIBDRM_FOUND OFF)
endif()
if(LIBDRM_FOUND)
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS})
- list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
if(${SUNSHINE_ENABLE_DRM})
+ list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
add_compile_definitions(SUNSHINE_BUILD_DRM)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
--
2.54.0
|