From c5943cd082461563fbfc89619a2e118b6e04f957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 29 Apr 2021 16:33:36 +0200 Subject: [PATCH] meson: Add udev_dir option Same as in gnome-settings-daemon, allows overriding where to install udev rules files. Part-of: --- data/meson.build | 2 +- meson.build | 6 +++++- meson_options.txt | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/data/meson.build b/data/meson.build index bf5c409d7..b1e81d1b5 100644 --- a/data/meson.build +++ b/data/meson.build @@ -61,6 +61,6 @@ install_data(['mutter-schemas.convert'], if have_libgudev install_data(['61-mutter.rules'], - install_dir: join_paths(udevdir, 'rules.d'), + install_dir: join_paths(udev_dir, 'rules.d'), ) endif diff --git a/meson.build b/meson.build index 6ba3ab45e..28b7645c7 100644 --- a/meson.build +++ b/meson.build @@ -181,7 +181,11 @@ if have_libgudev libudev_dep = dependency('libudev', version: udev_req) gudev_dep = dependency('gudev-1.0', version: gudev_req) udev_dep = dependency('udev') - udevdir = udev_dep.get_pkgconfig_variable('udevdir') + + udev_dir = get_option('udev_dir') + if udev_dir == '' + udev_dir = udev_dep.get_pkgconfig_variable('udevdir') + endif endif have_native_backend = get_option('native_backend') diff --git a/meson_options.txt b/meson_options.txt index 84e7dcc6c..61d9cb48d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -69,6 +69,12 @@ option('udev', description: 'Enable udev support when using the X11 backend' ) +option('udev_dir', + type: 'string', + value: '', + description: 'Absolute path of the udev base directory' +) + option('libwacom', type: 'boolean', value: true,