From 0724f45731600219cd0598232792c51207586ed2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 13 Jul 2023 10:19:21 +0000 Subject: [PATCH] build: require udevdir if udev support is disabled We cannot guess the udevdir path from the pkgconfig variable if there is no udev support in the system, so explicitly fail. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/750 --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index dbf8e95a..c136f843 100644 --- a/meson.build +++ b/meson.build @@ -187,9 +187,10 @@ if enable_udev endif config_h.set('WITH_UDEV', enable_udev) -# udev base directory +# udev base directory (required to install rules even when udev support is disabled) udev_udevdir = get_option('udevdir') if udev_udevdir == '' + assert(enable_udev, 'udevdir must be explicitly given if udev support is disabled') udev_udevdir = dependency('udev').get_pkgconfig_variable('udevdir') endif udev_rulesdir = udev_udevdir / 'rules.d'