summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/gobject-introspection.bbclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass
index 4ceb0c68b1..504f75e28d 100644
--- a/meta/classes/gobject-introspection.bbclass
+++ b/meta/classes/gobject-introspection.bbclass
@@ -6,14 +6,24 @@
6# This also sets up autoconf-based recipes to build introspection data (or not), 6# This also sets up autoconf-based recipes to build introspection data (or not),
7# depending on distro and machine features (see gobject-introspection-data class). 7# depending on distro and machine features (see gobject-introspection-data class).
8inherit python3native gobject-introspection-data 8inherit python3native gobject-introspection-data
9
10# meson: default option name to enable/disable introspection. This matches most
11# project's configuration. In doubts - check meson_options.txt in project's
12# source path.
13GIR_MESON_OPTION ?= 'introspection'
14GIR_MESON_ENABLE_FLAG ?= 'true'
15GIR_MESON_DISABLE_FLAG ?= 'false'
16
17# Auto enable/disable based on GI_DATA_ENABLED
9EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " 18EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
19EXTRA_OEMESON_prepend_class-target = "-D${GIR_MESON_OPTION}=${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GIR_MESON_ENABLE_FLAG}', '${GIR_MESON_DISABLE_FLAG}', d)} "
10 20
11# When building native recipes, disable introspection, as it is not necessary, 21# When building native recipes, disable introspection, as it is not necessary,
12# pulls in additional dependencies, and makes build times longer 22# pulls in additional dependencies, and makes build times longer
13EXTRA_OECONF_prepend_class-native = "--disable-introspection " 23EXTRA_OECONF_prepend_class-native = "--disable-introspection "
14EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection " 24EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection "
15 25EXTRA_OEMESON_prepend_class-native = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} "
16UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection" 26EXTRA_OEMESON_prepend_class-nativesdk = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} "
17 27
18# Generating introspection data depends on a combination of native and target 28# Generating introspection data depends on a combination of native and target
19# introspection tools, and qemu to run the target tools. 29# introspection tools, and qemu to run the target tools.