summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-09-29 11:00:45 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2020-09-30 09:36:06 -0400
commit2a6bb53779c760dfabad9e8e8ae225dc12ac5631 (patch)
treec8a09a3218395da09f828fe00fa1e8da019034bd
parentbbdb6890f2c45a7f5353402fb723073d15227612 (diff)
downloadpango-2a6bb53779c760dfabad9e8e8ae225dc12ac5631.tar.gz
meson: Change introspection option to yielding feature
Yielding option means that if pango is built as a subproject, it will take the value of that option from the parent project (e.g. gst-build). For that to work it must be of the same type, which is "feature" instead of "boolean" in all GStreamer modules.
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--meson_options.txt5
-rw-r--r--pango/meson.build3
3 files changed, 6 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dffa8056..c287010c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,7 +40,7 @@ asan-build:
needs: []
variables:
script:
- - CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=false _build
+ - CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build
- ninja -C _build
- .gitlab-ci/run-tests.sh _build
allow_failure: true
diff --git a/meson_options.txt b/meson_options.txt
index 5aa7c795..235b8a48 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,8 +4,9 @@ option('gtk_doc',
value: false)
option('introspection',
description: 'Build the GObject introspection data for Pango',
- type: 'boolean',
- value: true)
+ type: 'feature',
+ value: 'auto',
+ yield: true)
option('install-tests',
description : 'Install tests',
type: 'boolean',
diff --git a/pango/meson.build b/pango/meson.build
index 4c055f52..0b87b644 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -121,7 +121,8 @@ libpango = library(
pango_dep_sources = [pango_enum_h]
-build_gir = get_option('introspection')
+gir = find_program('g-ir-scanner', required : get_option('introspection'))
+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
if build_gir
gir_args = [