mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-02 22:28:45 +00:00
70 lines
1.3 KiB
Meson
70 lines
1.3 KiB
Meson
if get_option('plugin_nvme')
|
|
if not get_option('gudev')
|
|
error('gudev is required for plugin_nvme')
|
|
endif
|
|
cargs = ['-DG_LOG_DOMAIN="FuPluginNvme"']
|
|
|
|
install_data([
|
|
'nvme.quirk',
|
|
],
|
|
install_dir: join_paths(datadir, 'fwupd', 'quirks.d')
|
|
)
|
|
|
|
shared_module('fu_plugin_nvme',
|
|
fu_hash,
|
|
sources : [
|
|
'fu-plugin-nvme.c',
|
|
'fu-nvme-common.c',
|
|
'fu-nvme-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,
|
|
],
|
|
)
|
|
|
|
if get_option('tests')
|
|
testdatadirs = environment()
|
|
testdatadirs.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
testdatadirs.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|
e = executable(
|
|
'nvme-self-test',
|
|
fu_hash,
|
|
sources : [
|
|
'fu-self-test.c',
|
|
'fu-nvme-common.c',
|
|
'fu-nvme-device.c',
|
|
],
|
|
include_directories : [
|
|
root_incdir,
|
|
fwupd_incdir,
|
|
fwupdplugin_incdir,
|
|
],
|
|
dependencies : [
|
|
plugin_deps,
|
|
],
|
|
link_with : [
|
|
fwupd,
|
|
fwupdplugin,
|
|
],
|
|
install : true,
|
|
install_dir : installed_test_bindir,
|
|
)
|
|
test('nvme-self-test', e, env : testdatadirs) # added to installed-tests
|
|
endif
|
|
endif
|