Commit aed62f8f authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson
Browse files

meson/xwayland: No libdrm nor epoxy without glamor

When building Xwayland with neither DRI nor GLamor support enabled with
the Meson build system, the resulting binary would still link against
libdrm and epoxy even though those are not used/needed.

Make sure we require and link against libdrm and epoxy only if needed.
Signed-off-by: default avatarOlivier Fourdan <>
parent e8a85ba8
......@@ -94,7 +94,7 @@ conf_data.set('NEED_DBUS', build_systemd_logind or build_hal)
conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd')
conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found())
conf_data.set('WITH_LIBDRM', libdrm_dep.found())
conf_data.set('WITH_LIBDRM', libdrm_required)
epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4'))
conf_data.set('GLXEXT', build_glx)
......@@ -192,14 +192,18 @@ 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'
xwayland_dep = [
dependency('wayland-client', version: wayland_req, required: xwayland_required),
dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required),
dependency('libdrm', version: libdrm_req, required: xwayland_required),
dependency('epoxy', required: xwayland_required),
if build_glamor
xwayland_dep += dependency('libdrm', version: libdrm_req, required: xwayland_required)
xwayland_dep += dependency('epoxy', required: xwayland_required)
build_xwayland = true
# check for all the deps being found, to handle 'auto' mode.
foreach d: xwayland_dep
......@@ -309,7 +313,7 @@ module_dir = join_paths(get_option('libdir'), get_option('module_dir'))
if glamor_option == 'auto'
build_glamor = build_xorg or build_xwayland
build_glamor = get_option('glamor') == 'true'
build_glamor = glamor_option == 'true'
gbm_dep = dependency('', required: false)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment