From 16054647abfc9fe5f71d0098e17415e45fa28199 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Mon, 8 May 2017 11:40:21 +0100 Subject: [PATCH] meson: Refine build_dbus As in autotools build, only turn on build_dbus (build dbus-core.c) if it's needed by build_hal or build_systemd_logind, not just because dbus is available. Building dbus-core.c without NEED_DBUS defined fails, as the contents of dbus-core.h are turned off. Signed-off-by: Jon Turney Acked-by: Eric Anholt --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 4baf96365..0a14de4dd 100644 --- a/meson.build +++ b/meson.build @@ -72,10 +72,8 @@ if host_machine.system() == 'windows' hal_option = 'no' endif -build_dbus = dbus_dep.found() - if get_option('systemd_logind') == 'auto' - build_systemd_logind = build_udev and build_dbus + build_systemd_logind = build_udev and dbus_dep.found() else build_systemd_logind = get_option('systemd_logind') == 'yes' endif @@ -177,6 +175,8 @@ if build_udev and build_hal error('Hotplugging through both libudev and hal not allowed') endif +build_dbus = build_hal or build_systemd_logind + udev_dep = [] if build_udev udev_dep = dependency('libudev', version: '>= 143')