meson: Fix generate_gir() dependencies

There is no need to search for gir variables into subprojects, they are
part of dependencies objects, meson will find them there.
This commit is contained in:
Xavier Claessens
2021-06-25 10:07:55 -04:00
parent 59d4333e23
commit b18e95d6b3

View File

@@ -1156,23 +1156,7 @@ if build_gir
'--warn-error',
]
# We may build some of the dependencies as sub-projects; this means
# that we need to depend on the built introspection data, instead of
# the installed one
gdk_gir_inc = [ 'cairo-1.0', 'Gio-2.0', ]
if pixbuf_dep.type_name() == 'internal'
gdk_gir_inc += subproject('gdk-pixbuf').get_variable('gdkpixbuf_gir').get(0)
else
gdk_gir_inc += 'GdkPixbuf-2.0'
endif
if pango_dep.type_name() == 'internal'
gdk_gir_inc += subproject('pango').get_variable('pango_gir').get(0)
gdk_gir_inc += subproject('pango').get_variable('pangocairo_gir').get(0)
else
gdk_gir_inc += ['Pango-1.0', 'PangoCairo-1.0']
endif
gdk_gir_inc = [ 'cairo-1.0', 'Gio-2.0', 'GdkPixbuf-2.0', 'Pango-1.0', 'PangoCairo-1.0' ]
gdk_gir = gnome.generate_gir(libgtk,
sources: gdk_public_headers + gdk_public_sources + [ gdkenum_h ],
@@ -1184,9 +1168,9 @@ if build_gir
includes: gdk_gir_inc,
header: 'gdk/gdk.h',
install: true,
dependencies: libgdk_dep,
extra_args: gir_args,
)
gdk_gir_dep = declare_dependency(sources: gdk_gir)
gtk_dep_sources += gdk_gir
if x11_enabled
@@ -1199,7 +1183,7 @@ if build_gir
export_packages: 'gtk4-x11',
includes: [ gdk_gir[0], 'xlib-2.0', ],
install: true,
dependencies: gdk_gir_dep,
dependencies: libgdk_dep,
header: 'gdk/x11/gdkx.h',
extra_args: gir_args,
)
@@ -1216,20 +1200,14 @@ if build_gir
export_packages: 'gtk4-wayland',
includes: [ gdk_gir[0], ],
install: true,
dependencies: gdk_gir_dep,
dependencies: libgdk_dep,
header: 'gdk/wayland/gdkwayland.h',
extra_args: gir_args,
)
gtk_dep_sources += gdk_wayland_gir
endif
gsk_gir_inc = [ gdk_gir[0] ]
if graphene_dep.type_name() == 'internal'
gsk_gir_inc += subproject('graphene').get_variable('graphene_gir').get(0)
else
gsk_gir_inc += 'Graphene-1.0'
endif
gsk_gir_inc = [ gdk_gir[0], 'Graphene-1.0' ]
gsk_gir = gnome.generate_gir(libgtk,
sources: gsk_public_headers + gsk_public_sources + [ gskenum_h ],
@@ -1241,11 +1219,9 @@ if build_gir
includes: gsk_gir_inc,
header: 'gsk/gsk.h',
install: true,
dependencies: [gdk_gir_dep, graphene_dep],
dependencies: libgsk_dep,
extra_args: gir_args,
)
gsk_gir_dep = declare_dependency(dependencies: [gdk_gir_dep, graphene_dep],
sources: gsk_gir)
gtk_dep_sources += gsk_gir
gtk_introspection_sources = [
@@ -1277,7 +1253,7 @@ if build_gir
includes: [ gdk_gir[0], gsk_gir[0], ],
header: 'gtk/gtk.h',
install: true,
dependencies: gsk_gir_dep,
dependencies: [gtk_deps, libgsk_dep],
extra_args: gir_args,
)
gtk_dep_sources += gtk_gir