meson: Always build hwdb file

We want systemd to pull our hwdb. In order to ease this, always build
the hwdb file, even if it is disabled.

Once systemd has merged the rules, downstream should turn off the rules
in libfprint. The default in libfprint will also be changed to not build
the hwdb (udev_rules option) eventually.
This commit is contained in:
Benjamin Berg 2021-01-19 14:19:10 +01:00
parent 55a2bb5536
commit cbce56c142
2 changed files with 12 additions and 8 deletions

View file

@ -301,14 +301,16 @@ udev_hwdb = executable('fprint-list-udev-hwdb',
link_with: libfprint_drivers, link_with: libfprint_drivers,
install: false) install: false)
if get_option('udev_rules') # We always build this file; primarily so that systemd can pull it
custom_target('udev-rules', # from the artefacts!
custom_target('udev-rules',
output: '60-autosuspend-@0@.hwdb'.format(versioned_libname), output: '60-autosuspend-@0@.hwdb'.format(versioned_libname),
capture: true, capture: true,
command: [ udev_hwdb ], command: [ udev_hwdb ],
install: true, install: get_option('udev_rules'),
install_dir: udev_hwdb_dir) install_dir: udev_hwdb_dir,
endif build_by_default: true
)
supported_devices = executable('fprint-list-supported-devices', supported_devices = executable('fprint-list-supported-devices',
'fprint-list-supported-devices.c', 'fprint-list-supported-devices.c',

View file

@ -181,6 +181,8 @@ if get_option('udev_rules')
udev_dep = dependency('udev') udev_dep = dependency('udev')
udev_hwdb_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/hwdb.d' udev_hwdb_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/hwdb.d'
endif endif
else
udev_hwdb_dir = false
endif endif
if get_option('gtk-examples') if get_option('gtk-examples')