meson: Add udev_dir option

Same as in gnome-settings-daemon, allows overriding where to install
udev rules files.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1844>
This commit is contained in:
Michel Dänzer 2021-04-29 16:33:36 +02:00 committed by Marge Bot
parent cc912614c7
commit c5943cd082
3 changed files with 12 additions and 2 deletions

View File

@ -61,6 +61,6 @@ install_data(['mutter-schemas.convert'],
if have_libgudev if have_libgudev
install_data(['61-mutter.rules'], install_data(['61-mutter.rules'],
install_dir: join_paths(udevdir, 'rules.d'), install_dir: join_paths(udev_dir, 'rules.d'),
) )
endif endif

View File

@ -181,7 +181,11 @@ if have_libgudev
libudev_dep = dependency('libudev', version: udev_req) libudev_dep = dependency('libudev', version: udev_req)
gudev_dep = dependency('gudev-1.0', version: gudev_req) gudev_dep = dependency('gudev-1.0', version: gudev_req)
udev_dep = dependency('udev') 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 endif
have_native_backend = get_option('native_backend') have_native_backend = get_option('native_backend')

View File

@ -69,6 +69,12 @@ option('udev',
description: 'Enable udev support when using the X11 backend' 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', option('libwacom',
type: 'boolean', type: 'boolean',
value: true, value: true,