fwupd/plugins/synaptics-mst/meson.build
Richard Hughes 5f9e4730f1 synaptics-mst: Read the customer ID (board ID) in a more safe way
Also split out the firmware parsing to an object so we can check the firmware
using firmware-parse and also fuzz it.

See also: https://github.com/fwupd/fwupd/issues/1665
2021-02-22 13:57:34 +00:00

77 lines
1.7 KiB
Meson

if get_option('plugin_synaptics_mst')
if not get_option('gudev')
error('gudev is required for plugin_synaptics_mst')
endif
cargs = ['-DG_LOG_DOMAIN="FuPluginSynapticsMST"']
install_data(['synaptics-mst.quirk'],
install_dir: join_paths(datadir, 'fwupd', 'quirks.d')
)
shared_module('fu_plugin_synaptics_mst',
fu_hash,
sources : [
'fu-plugin-synaptics-mst.c',
'fu-synaptics-mst-common.c',
'fu-synaptics-mst-connection.c',
'fu-synaptics-mst-device.c',
'fu-synaptics-mst-firmware.c', # fuzzing
],
include_directories : [
root_incdir,
fwupd_incdir,
fwupdplugin_incdir,
],
install : true,
install_dir: plugin_dir,
c_args : [
cargs,
],
link_with : [
fwupd,
fwupdplugin,
],
dependencies : [
plugin_deps,
],
)
if get_option('tests')
testdatadirs = environment()
testdatadirs.set('G_TEST_SRCDIR', meson.current_source_dir())
testdatadirs.set('G_TEST_BUILDDIR', meson.current_build_dir())
testdatadirs.set('FWUPD_LOCALSTATEDIR', '/tmp/fwupd-self-test/var')
e = executable(
'synaptics-mst-self-test',
fu_hash,
sources : [
'fu-self-test.c',
'fu-synaptics-mst-common.c',
'fu-synaptics-mst-connection.c',
'fu-synaptics-mst-device.c',
'fu-synaptics-mst-firmware.c',
],
include_directories : [
root_incdir,
fwupd_incdir,
fwupdplugin_incdir,
],
dependencies : [
plugin_deps,
sqlite,
valgrind,
],
link_with : [
fwupd,
fwupdplugin,
],
c_args : [
cargs,
],
install : true,
install_dir : installed_test_bindir,
)
test('synaptics-mst-self-test', e, env: testdatadirs)
endif
endif