Merge branch '3401-gir-scanner-deps' into 'main'

introspection: Add libgirepository as a dep to all generate_gir() calls

Closes #3401

See merge request GNOME/glib!4122
This commit is contained in:
Philip Withnall 2024-06-27 09:14:45 +00:00
commit 935dd89622

View File

@ -7,6 +7,16 @@ gi_gen_shared_sources = [
gmodule_visibility_h,
]
gi_gen_shared_dependencies = [
# libgirepository is not needed by most of the modules below, but it is needed
# by the g-ir-scanner generated dumper program. If we dont explicitly include
# the local version of it here, Meson will implicitly link against it anyway,
# and that might pull in a different version, or try to link against a
# half-built local version as the build ordering dependency tree wont
# reflect this relationship.
libgirepository_dep,
]
gi_gen_env_variables = environment()
if 'address' in glib_sanitizers
@ -75,7 +85,7 @@ glib_gir = gnome.generate_gir(libglib,
header: 'glib.h',
install: true,
install_dir_gir: glib_girdir,
dependencies: [
dependencies: gi_gen_shared_dependencies + [
libgobject_dep,
],
env: gi_gen_env_variables,
@ -103,7 +113,7 @@ if host_system == 'windows'
includes: [ glib_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: [
dependencies: gi_gen_shared_dependencies + [
libgobject_dep,
],
env: gi_gen_env_variables,
@ -132,7 +142,7 @@ else
includes: [ glib_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: [
dependencies: gi_gen_shared_dependencies + [
libgobject_dep,
],
env: gi_gen_env_variables,
@ -166,6 +176,7 @@ gobject_gir = gnome.generate_gir(libgobject,
includes: [ glib_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: gi_gen_shared_dependencies,
env: gi_gen_env_variables,
extra_args: gir_args + [
'-DGOBJECT_COMPILATION',
@ -192,7 +203,7 @@ gmodule_gir = gnome.generate_gir(libgmodule,
includes: [ glib_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: [
dependencies: gi_gen_shared_dependencies + [
libglib_dep,
],
env: gi_gen_env_variables,
@ -255,7 +266,7 @@ gio_gir = gnome.generate_gir(libgio,
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: [
dependencies: gi_gen_shared_dependencies + [
libglib_dep,
libgobject_dep,
libgmodule_dep,
@ -281,7 +292,7 @@ if host_system == 'windows'
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: [
dependencies: gi_gen_shared_dependencies + [
libglib_dep,
libgobject_dep,
libgmodule_dep,
@ -311,7 +322,7 @@ else
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: [
dependencies: gi_gen_shared_dependencies + [
libglib_dep,
libgobject_dep,
libgmodule_dep,
@ -356,7 +367,12 @@ girepository_gir = gnome.generate_gir(libgirepository,
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
install: true,
install_dir_gir: glib_girdir,
dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep ],
dependencies: gi_gen_shared_dependencies + [
libglib_dep,
libgobject_dep,
libgmodule_dep,
libgio_dep,
],
extra_args: gir_args + libgirepository_gir_args,
env: gi_libgirepository_gen_env_variables,
)