Skip to content

Commit eebc124

Browse files
committed
build(deps): fix use of libdrm headers when DRM capture is disabled
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
1 parent 5db3819 commit eebc124

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cmake/compile_definitions/linux.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,17 @@ if(CUDA_FOUND)
8080
add_compile_definitions(SUNSHINE_BUILD_CUDA)
8181
endif()
8282

83-
# libdrm is required for DRM (KMS), KWin ScreenCast and Wayland
84-
if(${SUNSHINE_ENABLE_DRM} OR ${SUNSHINE_ENABLE_KWIN} OR ${SUNSHINE_ENABLE_WAYLAND})
83+
# libdrm is required for DRM (KMS). Only the headers are required for Wayland,
84+
# Vulkan, and PipeWire (KWin, Portal).
85+
if(${SUNSHINE_ENABLE_DRM} OR ${SUNSHINE_ENABLE_WAYLAND} OR ${SUNSHINE_ENABLE_VULKAN} OR ${SUNSHINE_ENABLE_KWIN} OR ${SUNSHINE_ENABLE_PORTAL})
8586
find_package(LIBDRM REQUIRED)
8687
else()
8788
set(LIBDRM_FOUND OFF)
8889
endif()
8990
if(LIBDRM_FOUND)
9091
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS})
91-
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
9292
if(${SUNSHINE_ENABLE_DRM})
93+
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
9394
add_compile_definitions(SUNSHINE_BUILD_DRM)
9495
list(APPEND PLATFORM_TARGET_FILES
9596
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")

0 commit comments

Comments
 (0)