fwupd/plugins/elantp/meson.build
Richard Hughes 3ffc3fa774 Add fu_common_sum8() common functionality
We now have 9 different plugins all using this functionality, and we're
about to add one more. Move this into common code so that all the
plugins are using the same endian and bufsz-safe versions.
2021-11-26 18:33:11 +03:00

69 lines
1.3 KiB
Meson

if get_option('gudev')
cargs = ['-DG_LOG_DOMAIN="FuPluginElantp"']
install_data([
'elantp.quirk',
],
install_dir: join_paths(datadir, 'fwupd', 'quirks.d')
)
shared_module('fu_plugin_elantp',
fu_hash,
sources : [
'fu-plugin-elantp.c',
'fu-elantp-firmware.c', # fuzzing
'fu-elantp-hid-device.c',
'fu-elantp-i2c-device.c',
],
include_directories : [
root_incdir,
fwupd_incdir,
fwupdplugin_incdir,
],
install : true,
install_dir: plugin_dir,
c_args : [
cargs,
'-DLOCALSTATEDIR="' + localstatedir + '"',
],
link_with : [
fwupd,
fwupdplugin,
],
dependencies : [
plugin_deps,
],
)
endif
if get_option('tests')
install_data(['tests/elantp.builder.xml'],
install_dir: join_paths(installed_test_datadir, 'tests'))
env = environment()
env.set('G_TEST_SRCDIR', meson.current_source_dir())
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
e = executable(
'elantp-self-test',
fu_hash,
sources : [
'fu-self-test.c',
'fu-elantp-firmware.c',
],
include_directories : [
root_incdir,
fwupd_incdir,
fwupdplugin_incdir,
],
dependencies : [
plugin_deps,
],
link_with : [
fwupd,
fwupdplugin,
],
install : true,
install_dir : installed_test_bindir,
)
test('elantp-self-test', e, env : env)
endif