summaryrefslogtreecommitdiff
path: root/libappstream-builder
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-07-13 17:35:41 +0200
committerRichard Hughes <richard@hughsie.com>2017-07-26 13:13:08 +0100
commite0846ce16a61cc2f929e0414d561259e464ff33b (patch)
tree5af1eba4d70a4bf6d512f9e861a5dc6418c7d2dd /libappstream-builder
parent74e4b5105b7bee8755cfa1b628f9fcd36698f3f6 (diff)
downloadappstream-glib-e0846ce16a61cc2f929e0414d561259e464ff33b.tar.gz
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>
Diffstat (limited to 'libappstream-builder')
-rw-r--r--libappstream-builder/meson.build38
1 files changed, 20 insertions, 18 deletions
diff --git a/libappstream-builder/meson.build b/libappstream-builder/meson.build
index ce257a4..55f0868 100644
--- a/libappstream-builder/meson.build
+++ b/libappstream-builder/meson.build
@@ -128,21 +128,23 @@ asbuilder_introspection_srcs = [
'asb-task.h',
]
-asglib_gir_dep = declare_dependency(sources: asglib_gir)
-
-gnome.generate_gir(asbuilder,
- sources : asbuilder_introspection_srcs,
- nsversion : '1.0',
- namespace : 'AppStreamBuilder',
- symbol_prefix : 'asb_',
- identifier_prefix : 'Asb',
- export_packages : 'appstream-builder',
- dependencies: asglib_gir_dep,
- includes : [
- 'AppStreamGlib-1.0',
- 'GdkPixbuf-2.0',
- 'Gio-2.0',
- 'GObject-2.0',
- ],
- install : true
-)
+if get_option('enable-introspection')
+ asglib_gir_dep = declare_dependency(sources: asglib_gir)
+
+ gnome.generate_gir(asbuilder,
+ sources : asbuilder_introspection_srcs,
+ nsversion : '1.0',
+ namespace : 'AppStreamBuilder',
+ symbol_prefix : 'asb_',
+ identifier_prefix : 'Asb',
+ export_packages : 'appstream-builder',
+ dependencies: asglib_gir_dep,
+ includes : [
+ 'AppStreamGlib-1.0',
+ 'GdkPixbuf-2.0',
+ 'Gio-2.0',
+ 'GObject-2.0',
+ ],
+ install : true
+ )
+endif