mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
de5347d0f2
This dependency is already required by many other widely used X11 programs, such as i3, Qt, and other XWMs. So it should be available on most systems. X11 support can be pretty broken without xcb-icccm, with focus issues for instance. Let's just remove this --please-break-my-desktop footgun option.
76 lines
1.5 KiB
Meson
76 lines
1.5 KiB
Meson
xwayland_libs = []
|
|
xwayland_required = [
|
|
'xcb',
|
|
'xcb-composite',
|
|
'xcb-icccm',
|
|
'xcb-render',
|
|
'xcb-xfixes',
|
|
]
|
|
xwayland_optional = {
|
|
'xcb-errors': 'Required for printing X11 errors.',
|
|
}
|
|
|
|
msg = []
|
|
if get_option('xwayland').enabled()
|
|
msg += 'Install "@0@" or pass "-Dxwayland=disabled".'
|
|
endif
|
|
if not get_option('xwayland').disabled()
|
|
msg += 'Required for Xwayland support.'
|
|
endif
|
|
|
|
xwayland = dependency('xwayland', required: false)
|
|
if not xwayland.found()
|
|
# There's no Xwayland release with the pkg-config file shipped yet.
|
|
xwayland_prog = find_program('Xwayland', required: false)
|
|
if not xwayland_prog.found()
|
|
if get_option('xwayland').enabled()
|
|
error('\n'.join(msg).format('xwayland'))
|
|
else
|
|
subdir_done()
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
foreach lib : xwayland_required
|
|
dep = dependency(lib,
|
|
required: get_option('xwayland'),
|
|
not_found_message: '\n'.join(msg).format(lib),
|
|
)
|
|
if not dep.found()
|
|
subdir_done()
|
|
endif
|
|
|
|
xwayland_libs += dep
|
|
endforeach
|
|
|
|
foreach lib, desc : xwayland_optional
|
|
msg = []
|
|
if get_option(lib).enabled()
|
|
msg += 'Install "@0@" or pass "-D@0@=disabled".'
|
|
endif
|
|
if not get_option(lib).disabled()
|
|
msg += desc
|
|
endif
|
|
|
|
dep = dependency(lib,
|
|
required: get_option(lib),
|
|
not_found_message: '\n'.join(msg).format(lib),
|
|
)
|
|
if dep.found()
|
|
xwayland_libs += dep
|
|
features += { lib: true }
|
|
endif
|
|
endforeach
|
|
|
|
wlr_files += files(
|
|
'selection/dnd.c',
|
|
'selection/incoming.c',
|
|
'selection/outgoing.c',
|
|
'selection/selection.c',
|
|
'server.c',
|
|
'sockets.c',
|
|
'xwayland.c',
|
|
'xwm.c',
|
|
)
|
|
wlr_deps += xwayland_libs
|
|
features += { 'xwayland': true }
|