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.
This commit is contained in:
Xavier Claessens 2020-09-30 09:41:28 -04:00
parent 87393c7fb6
commit 0e5dac8c25
6 changed files with 11 additions and 7 deletions

View File

@ -223,7 +223,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 wayland
artifacts:

View File

@ -22,7 +22,7 @@ flatpak build ${builddir} meson \
-Dprint-backends=file \
-Dbuild-tests=false \
-Dbuild-examples=false \
-Dintrospection=false \
-Dintrospection=disabled \
-Ddemos=true \
_flatpak_build

View File

@ -67,7 +67,7 @@ meson \
-Dwayland-backend=false \
-Dwin32-backend=true \
-Dvulkan=disabled \
-Dintrospection=false \
-Dintrospection=disabled \
-Dgtk:werror=true \
_build
unset CCACHE_DISABLE

View File

@ -1075,8 +1075,11 @@ libgtk = library('gtk-4',
install: true)
gtk_dep_sources = [gtkversion, gtktypebuiltins_h]
# Introspection
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 = [
'-DGTK_COMPILATION',

View File

@ -876,7 +876,7 @@ summary('Tracker support', tracker3_dep.found(), section: 'Features')
# Build
summary('Debugging', get_option('debug'), section: 'Build')
summary('Optimization', get_option('optimization'), section: 'Build')
summary('Introspection', get_option('introspection'), section: 'Build')
summary('Introspection', build_gir, section: 'Build')
summary('Documentation', get_option('gtk_doc'), section: 'Build')
summary('Man pages', get_option('man-pages'), section: 'Build')
summary('Tests', get_option('build-tests'), section: 'Build')

View File

@ -84,8 +84,9 @@ option('man-pages',
description : 'Build man pages for installed tools')
option('introspection',
type: 'boolean',
value: 'true',
type: 'feature',
value: 'auto',
yield: true,
description : 'Build introspection data (requires gobject-introspection)')
# Demos, examples and tests