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,