Skip to content

Commit 5db3819

Browse files
committed
build(deps): libcap is mandatory on Linux now
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
1 parent 0e35140 commit 5db3819

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

cmake/compile_definitions/linux.cmake

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,18 @@ endif()
8989
if(LIBDRM_FOUND)
9090
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS})
9191
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
92+
if(${SUNSHINE_ENABLE_DRM})
93+
add_compile_definitions(SUNSHINE_BUILD_DRM)
94+
list(APPEND PLATFORM_TARGET_FILES
95+
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
96+
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
97+
endif()
9298
endif()
9399

94-
# drm
95-
if(${SUNSHINE_ENABLE_DRM})
96-
find_package(LIBCAP REQUIRED)
97-
else()
98-
set(LIBCAP_FOUND OFF)
99-
endif()
100-
if(LIBDRM_FOUND AND LIBCAP_FOUND)
101-
add_compile_definitions(SUNSHINE_BUILD_DRM)
102-
include_directories(SYSTEM ${LIBCAP_INCLUDE_DIRS})
103-
list(APPEND PLATFORM_LIBRARIES ${LIBCAP_LIBRARIES})
104-
list(APPEND PLATFORM_TARGET_FILES
105-
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
106-
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
107-
endif()
100+
# Capabilities
101+
find_package(LIBCAP REQUIRED)
102+
include_directories(SYSTEM ${LIBCAP_INCLUDE_DIRS})
103+
list(APPEND PLATFORM_LIBRARIES ${LIBCAP_LIBRARIES})
108104

109105
# evdev
110106
include(dependencies/libevdev_Sunshine)

0 commit comments

Comments
 (0)