diff --git a/libfprint/meson.build b/libfprint/meson.build index e385ce83..3464bf37 100644 --- a/libfprint/meson.build +++ b/libfprint/meson.build @@ -301,14 +301,16 @@ udev_hwdb = executable('fprint-list-udev-hwdb', link_with: libfprint_drivers, install: false) -if get_option('udev_rules') - custom_target('udev-rules', - output: '60-autosuspend-@0@.hwdb'.format(versioned_libname), - capture: true, - command: [ udev_hwdb ], - install: true, - install_dir: udev_hwdb_dir) -endif +# We always build this file; primarily so that systemd can pull it +# from the artefacts! +custom_target('udev-rules', + output: '60-autosuspend-@0@.hwdb'.format(versioned_libname), + capture: true, + command: [ udev_hwdb ], + install: get_option('udev_rules'), + install_dir: udev_hwdb_dir, + build_by_default: true + ) supported_devices = executable('fprint-list-supported-devices', 'fprint-list-supported-devices.c', diff --git a/meson.build b/meson.build index 0d4822d3..cd0d83d2 100644 --- a/meson.build +++ b/meson.build @@ -181,6 +181,8 @@ if get_option('udev_rules') udev_dep = dependency('udev') udev_hwdb_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/hwdb.d' endif +else + udev_hwdb_dir = false endif if get_option('gtk-examples')