meson: Convert xwayland option to feature type

wlroots as a subproject now yields the xwayland meson option to its
parent. We need to match the type for this to work. This also adds
support for auto mode, where xwayland is used if present but no warning
is given otherwise.
This commit is contained in:
Kenny Levinsen 2023-11-22 17:30:59 +01:00 committed by Simon Ser
parent 1ff7945ba1
commit c801544d61
3 changed files with 6 additions and 6 deletions

View file

@ -64,9 +64,9 @@ server_protos = declare_dependency(
sources: server_protos_headers,
)
if get_option('xwayland')
if not get_option('xwayland').disabled()
wlroots_has_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true'
if not wlroots_has_xwayland
if get_option('xwayland').enabled() and not wlroots_has_xwayland
error('Cannot build Cage with XWayland support: wlroots has been built without it')
endif
have_xwayland = true