mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-13 14:32:57 -04:00
backend/session: add linux device manager
This commit is contained in:
parent
905ebaa89a
commit
baf2e1852f
4 changed files with 323 additions and 7 deletions
|
|
@ -6,7 +6,13 @@ libseat = dependency(
|
|||
required: session_required,
|
||||
not_found_message: 'Required for session support.',
|
||||
)
|
||||
if not libseat.found()
|
||||
udev = dependency('libudev', required: get_option('udev'))
|
||||
has_netlink = cc.has_header('linux/netlink.h')
|
||||
has_device_manager = udev.found() or has_netlink
|
||||
if session_required and not has_device_manager
|
||||
error('Session requires either udev or <linux/netlink.h>')
|
||||
endif
|
||||
if not (libseat.found() and has_device_manager)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
|
|
@ -14,9 +20,12 @@ wlr_files += files('session.c')
|
|||
wlr_deps += [libseat]
|
||||
features += { 'session': true }
|
||||
|
||||
udev = dependency('libudev', required: get_option('udev'))
|
||||
if udev.found()
|
||||
wlr_files += files('udev.c')
|
||||
wlr_deps += [udev]
|
||||
internal_features += { 'udev': true }
|
||||
endif
|
||||
|
||||
if has_netlink
|
||||
wlr_files += files('linux.c')
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue