diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2019-08-01 13:34:13 +0200 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2019-08-15 17:08:04 +0000 |
commit | aed62f8fbea3f618f97ee0105b2d430c8cddf8f5 (patch) | |
tree | b30ec94a1b850bd7b236ac0f9668ef0d3fbd0806 /meson.build | |
parent | e8a85ba818a82d8c5acacc53dfc4fdfff573ae90 (diff) |
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: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meson.build b/meson.build index be3252a71..def32e9b9 100644 --- a/meson.build +++ b/meson.build @@ -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) + endif + 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 else - build_glamor = get_option('glamor') == 'true' + build_glamor = glamor_option == 'true' endif gbm_dep = dependency('', required: false) |