Merge branch 'fix-introspection-test-deps' into 'main'

build: Lift gir and build_gir to toplevel

See merge request GNOME/gtk!5350
This commit is contained in:
Matthias Clasen 2022-12-20 04:04:17 +00:00
commit b56224fc16
4 changed files with 9 additions and 6 deletions

View File

@ -1180,9 +1180,6 @@ libgtk = shared_library('gtk-4',
gtk_dep_sources = [gtkversion, gtktypebuiltins_h]
# 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

@ -728,6 +728,11 @@ int main () {
endif
endif
# 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())
project_build_root = meson.current_build_dir()
subdir('gtk/css')

View File

@ -14,7 +14,10 @@ if hasattr(os, 'add_dll_directory'):
if path != '' and os.path.isdir(path):
os.add_dll_directory(path)
try:
import gi
except ImportError:
sys.exit(77) # skip this test, gi module is not available
gi.require_version('Gtk', '4.0')

View File

@ -1,5 +1,3 @@
py = import('python').find_installation('python3', modules: ['gi'])
env = environment()
env.prepend('GI_TYPELIB_PATH',
project_build_root / 'gtk',