diff --git a/meson.build b/meson.build index 5f57990..af9a7d3 100644 --- a/meson.build +++ b/meson.build @@ -40,7 +40,12 @@ wayland_server = dependency('wayland-server') xkbcommon = dependency('xkbcommon') math = cc.find_library('m') -have_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true' +xwayland_opt = get_option('xwayland') +_wlroots_has_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true' +if xwayland_opt.enabled() and not _wlroots_has_xwayland + error('wlroots was built without XWayland support') +endif +have_xwayland = _wlroots_has_xwayland and not xwayland_opt.disabled() version = '@0@'.format(meson.project_version()) git = find_program('git', native: true, required: false) diff --git a/meson_options.txt b/meson_options.txt index e40a23d..62452b3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages') +option('xwayland', type: 'feature', value: 'auto', description: 'Enable XWayland support')