Merge branch 'introspection' into 'master'

meson: Change introspection option to yielding feature

See merge request GNOME/gtk!2648
This commit is contained in:
Matthias Clasen 2020-09-30 17:50:21 +00:00
commit 5a3aed8ade
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