Skip to content

Conversation

chewi
Copy link
Contributor

@chewi chewi commented Jul 10, 2025

Description

wayland.cpp makes use of libdrm, so it should be pulled in as a dependency. The build fails otherwise.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

@ReenigneArcher
Copy link
Member

Maybe we should just fail if DRM is OFF and WAYLAND is ON?

# drm
if(${SUNSHINE_ENABLE_DRM})
find_package(LIBDRM REQUIRED)
find_package(LIBCAP REQUIRED)
else()
set(LIBDRM_FOUND OFF)
set(LIBCAP_FOUND OFF)
endif()
if(LIBDRM_FOUND AND LIBCAP_FOUND)
add_compile_definitions(SUNSHINE_BUILD_DRM)
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS} ${LIBCAP_INCLUDE_DIRS})
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_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()

@chewi
Copy link
Contributor Author

chewi commented Jul 11, 2025

I thought that, but it's about as much code either way. I figured I might as well give Gentoo users what they're asking for. Also, the DRM backend additionally requires libcap.

@ReenigneArcher
Copy link
Member

@chewi, thank you for the PR! I ended going an alternate route in #4070 which wouldn't result in duplicated includes or platform libraries.

@chewi chewi deleted the wayland-libdrm branch July 13, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants