From 274d54d1c3876fd8c5142f43cd9204c0de417e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 23 Oct 2020 12:40:41 +0200 Subject: [PATCH] meson: Build Xwayland unconditionally --- meson.build | 46 +++++++++++++--------------------------------- meson_options.txt | 6 ++---- 2 files changed, 15 insertions(+), 37 deletions(-) diff --git a/meson.build b/meson.build index 1e2689bb3..21ba99234 100644 --- a/meson.build +++ b/meson.build @@ -153,36 +153,22 @@ if with_dtrace dtrace = find_program('dtrace', required: true) endif -build_xwayland = false -if (host_machine.system() != 'darwin' and - host_machine.system() != 'windows') - if get_option('xwayland') != 'false' - xwayland_required = get_option('xwayland') == 'true' - build_glamor = glamor_option == 'true' or glamor_option == 'auto' +build_xwayland = true +build_glamor = glamor_option != 'false' - xwayland_path = get_option('xwayland-path') - if (xwayland_path == '') - xwayland_path = join_paths(get_option('prefix'), get_option('bindir')) - endif +xwayland_path = get_option('xwayland-path') +if (xwayland_path == '') + xwayland_path = join_paths(get_option('prefix'), get_option('bindir')) +endif - xwayland_dep = [ - dependency('wayland-client', version: wayland_req, required: xwayland_required), - dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required), - ] +xwayland_dep = [ + dependency('wayland-client', version: wayland_req, required: true), + dependency('wayland-protocols', version: wayland_protocols_req, required: true), +] - if build_glamor - xwayland_dep += dependency('libdrm', version: libdrm_req, required: xwayland_required) - xwayland_dep += dependency('epoxy', required: xwayland_required) - endif - - build_xwayland = true - # check for all the deps being found, to handle 'auto' mode. - foreach d: xwayland_dep - if not d.found() - build_xwayland = false - endif - endforeach - endif +if build_glamor + xwayland_dep += dependency('libdrm', version: libdrm_req, required: true) + xwayland_dep += dependency('epoxy', required: true) endif if get_option('ipv6') == 'auto' @@ -191,12 +177,6 @@ else build_ipv6 = get_option('ipv6') == 'true' endif -if glamor_option == 'auto' - build_glamor = build_xwayland -else - build_glamor = glamor_option == 'true' -endif - gbm_dep = dependency('', required: false) epoxy_dep = dependency('', required: false) if build_glamor diff --git a/meson_options.txt b/meson_options.txt index 05d672827..809ce59a4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,5 @@ -option('xwayland', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', - description: 'Enable XWayland X server') -option('glamor', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', - description: 'Enable glamor (default yes for Xwayland builds)') +option('glamor', type: 'boolean', value: true, + description: 'Enable glamor (default yes)') option('xwayland_eglstream', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable EGLStream support for glamor on Xwayland') option('xvfb', type: 'boolean', value: true,