Skip to content

Commit cac5bf4

Browse files
chewiReenigneArcher
authored andcommitted
build(deps): fix use of libdrm headers when DRM capture is disabled
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
1 parent 6281d41 commit cac5bf4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cmake/compile_definitions/linux.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,18 @@ 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}
86+
OR ${SUNSHINE_ENABLE_KWIN} OR ${SUNSHINE_ENABLE_PORTAL})
8587
find_package(LIBDRM REQUIRED)
8688
else()
8789
set(LIBDRM_FOUND OFF)
8890
endif()
8991
if(LIBDRM_FOUND)
9092
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS})
91-
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
9293
if(${SUNSHINE_ENABLE_DRM})
94+
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
9395
add_compile_definitions(SUNSHINE_BUILD_DRM)
9496
list(APPEND PLATFORM_TARGET_FILES
9597
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")

0 commit comments

Comments
 (0)