mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-24 13:12:25 +00:00
meson: introspection optional
Calling g-ir-scanner when cross-compiling with bitbake/OpenEmbedded fails because it calls the wrong ld (the one from the host). More work will be needed in meson.bbclass and/or gobject-introspection.bbclass to make it work. In the meantime, having an option to turn of introspection is useful perhaps also in other cases where the extra work is not needed. For example, fwupd works fine also when it is off. The name of the new meson option matches the --disable-introspection that is used by some autotools-based projects. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
This commit is contained in:
parent
9ac53e28b1
commit
eb03b0f33d
@ -89,41 +89,43 @@ executable(
|
||||
install_dir : get_option('bindir')
|
||||
)
|
||||
|
||||
gnome.generate_gir(dfu,
|
||||
sources : [
|
||||
'dfu-common.c',
|
||||
'dfu-common.h',
|
||||
'dfu-context.c',
|
||||
'dfu-context.h',
|
||||
'dfu-device.c',
|
||||
'dfu-device.h',
|
||||
'dfu-element.c',
|
||||
'dfu-element.h',
|
||||
'dfu-error.c',
|
||||
'dfu-error.h',
|
||||
'dfu-firmware.c',
|
||||
'dfu-firmware.h',
|
||||
'dfu-image.c',
|
||||
'dfu-image.h',
|
||||
'dfu-sector.c',
|
||||
'dfu-sector.h',
|
||||
'dfu-target.c',
|
||||
'dfu-target.h',
|
||||
],
|
||||
nsversion : '1.0',
|
||||
namespace : 'Dfu',
|
||||
symbol_prefix : 'dfu',
|
||||
identifier_prefix : 'Dfu',
|
||||
export_packages : 'dfu',
|
||||
dependencies : deps,
|
||||
includes : [
|
||||
'AppStreamGlib-1.0',
|
||||
'Gio-2.0',
|
||||
'GObject-2.0',
|
||||
'GUsb-1.0',
|
||||
],
|
||||
install : true
|
||||
)
|
||||
if get_option('enable-introspection')
|
||||
gnome.generate_gir(dfu,
|
||||
sources : [
|
||||
'dfu-common.c',
|
||||
'dfu-common.h',
|
||||
'dfu-context.c',
|
||||
'dfu-context.h',
|
||||
'dfu-device.c',
|
||||
'dfu-device.h',
|
||||
'dfu-element.c',
|
||||
'dfu-element.h',
|
||||
'dfu-error.c',
|
||||
'dfu-error.h',
|
||||
'dfu-firmware.c',
|
||||
'dfu-firmware.h',
|
||||
'dfu-image.c',
|
||||
'dfu-image.h',
|
||||
'dfu-sector.c',
|
||||
'dfu-sector.h',
|
||||
'dfu-target.c',
|
||||
'dfu-target.h',
|
||||
],
|
||||
nsversion : '1.0',
|
||||
namespace : 'Dfu',
|
||||
symbol_prefix : 'dfu',
|
||||
identifier_prefix : 'Dfu',
|
||||
export_packages : 'dfu',
|
||||
dependencies : deps,
|
||||
includes : [
|
||||
'AppStreamGlib-1.0',
|
||||
'Gio-2.0',
|
||||
'GObject-2.0',
|
||||
'GUsb-1.0',
|
||||
],
|
||||
install : true
|
||||
)
|
||||
endif
|
||||
|
||||
if get_option('enable-tests')
|
||||
testdatadir = join_paths(meson.current_source_dir(), 'tests')
|
||||
|
@ -68,39 +68,41 @@ pkgg.generate(
|
||||
description : 'fwupd is a system daemon for installing device firmware',
|
||||
)
|
||||
|
||||
gnome.generate_gir(fwupd,
|
||||
sources : [
|
||||
'fwupd-client.c',
|
||||
'fwupd-client.h',
|
||||
'fwupd-device.c',
|
||||
'fwupd-device.h',
|
||||
'fwupd-enums.c',
|
||||
'fwupd-enums.h',
|
||||
'fwupd-error.c',
|
||||
'fwupd-error.h',
|
||||
'fwupd-release.c',
|
||||
'fwupd-release.h',
|
||||
'fwupd-remote.c',
|
||||
'fwupd-remote.h',
|
||||
'fwupd-result.c',
|
||||
'fwupd-result.h',
|
||||
],
|
||||
nsversion : '1.0',
|
||||
namespace : 'Fwupd',
|
||||
symbol_prefix : 'fwupd',
|
||||
identifier_prefix : 'Fwupd',
|
||||
export_packages : 'fwupd',
|
||||
dependencies : [
|
||||
giounix,
|
||||
soup,
|
||||
],
|
||||
includes : [
|
||||
'Gio-2.0',
|
||||
'GObject-2.0',
|
||||
'Soup-2.4',
|
||||
],
|
||||
install : true
|
||||
)
|
||||
if get_option('enable-introspection')
|
||||
gnome.generate_gir(fwupd,
|
||||
sources : [
|
||||
'fwupd-client.c',
|
||||
'fwupd-client.h',
|
||||
'fwupd-device.c',
|
||||
'fwupd-device.h',
|
||||
'fwupd-enums.c',
|
||||
'fwupd-enums.h',
|
||||
'fwupd-error.c',
|
||||
'fwupd-error.h',
|
||||
'fwupd-release.c',
|
||||
'fwupd-release.h',
|
||||
'fwupd-remote.c',
|
||||
'fwupd-remote.h',
|
||||
'fwupd-result.c',
|
||||
'fwupd-result.h',
|
||||
],
|
||||
nsversion : '1.0',
|
||||
namespace : 'Fwupd',
|
||||
symbol_prefix : 'fwupd',
|
||||
identifier_prefix : 'Fwupd',
|
||||
export_packages : 'fwupd',
|
||||
dependencies : [
|
||||
giounix,
|
||||
soup,
|
||||
],
|
||||
includes : [
|
||||
'Gio-2.0',
|
||||
'GObject-2.0',
|
||||
'Soup-2.4',
|
||||
],
|
||||
install : true
|
||||
)
|
||||
endif
|
||||
|
||||
if get_option('enable-tests')
|
||||
testdatadir = join_paths(meson.source_root(), 'data')
|
||||
|
@ -1,4 +1,5 @@
|
||||
option('enable-doc', type : 'boolean', value : true, description : 'enable developer documentation')
|
||||
option('enable-introspection', type : 'boolean', value : true, description : 'generate GObject Introspection data')
|
||||
option('enable-man', type : 'boolean', value : true, description : 'enable man pages')
|
||||
option('enable-tests', type : 'boolean', value : true, description : 'enable tests')
|
||||
option('enable-colorhug', type : 'boolean', value : true, description : 'enable ColorHug support')
|
||||
|
Loading…
Reference in New Issue
Block a user