diff options
Diffstat (limited to 'meta/classes/gobject-introspection.bbclass')
-rw-r--r-- | meta/classes/gobject-introspection.bbclass | 14 |
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). |
8 | inherit python3native gobject-introspection-data | 8 | inherit 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. | ||
13 | GIR_MESON_OPTION ?= 'introspection' | ||
14 | GIR_MESON_ENABLE_FLAG ?= 'true' | ||
15 | GIR_MESON_DISABLE_FLAG ?= 'false' | ||
16 | |||
17 | # Auto enable/disable based on GI_DATA_ENABLED | ||
9 | EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " | 18 | EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " |
19 | EXTRA_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 |
13 | EXTRA_OECONF_prepend_class-native = "--disable-introspection " | 23 | EXTRA_OECONF_prepend_class-native = "--disable-introspection " |
14 | EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection " | 24 | EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection " |
15 | 25 | EXTRA_OEMESON_prepend_class-native = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} " | |
16 | UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection" | 26 | EXTRA_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. |