build(deps): fix building on Linux with DRM capture disabled#5224
build(deps): fix building on Linux with DRM capture disabled#5224chewi wants to merge 2 commits into
Conversation
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5224 +/- ##
=========================================
Coverage ? 17.01%
=========================================
Files ? 111
Lines ? 23371
Branches ? 10432
=========================================
Hits ? 3977
Misses ? 15024
Partials ? 4370
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
|
| 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") | ||
| list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1) |
There was a problem hiding this comment.
Should all this just go right under the find_package(LIBDRM REQUIRED)? And do we need the if(${SUNSHINE_ENABLE_DRM}) condition?
There was a problem hiding this comment.
Should all this just go right under the
find_package(LIBDRM REQUIRED)?
It could, I was just following the (IMHO slightly odd) pattern you have here already.
And do we need the
if(${SUNSHINE_ENABLE_DRM})condition?
As it says, the other cases only require the headers. Without this condition, we would be overlinking. We still need to conditionally build kmsgrab.cpp anyway.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|



Description
libcap is mandatory on Linux as of recently. The build still only links it when DRM capture is enabled.
The libdrm library is only required for DRM capture. In other cases, some of which are currently missed by the build, only the headers are required.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage