mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gobject: Make GLib-2.0 gir build depend on GObject dependency
GLib gir requires glib-types.h that also includes gobject-visibility.h that needs to be generated in order to be able to generate the GLib gir, so explicitly add it to the sources. Also, in order to link the typelib we need the definitions of the *_get_type() functions that are defined in the gboxed.c file, so this should be part of the gir sources or we'll have linking issues.
This commit is contained in:
parent
30d6e911c4
commit
385ae1b964
@ -163,6 +163,13 @@ pkg.generate(libgobject,
|
||||
description : 'GLib Type, Object, Parameter and Signal Library',
|
||||
)
|
||||
|
||||
libgobject_dep = declare_dependency(link_with : libgobject,
|
||||
include_directories : [gobjectinc],
|
||||
sources : [gobject_visibility_h, glib_enumtypes_h],
|
||||
dependencies : [libglib_dep],
|
||||
)
|
||||
meson.override_dependency('gobject-2.0', libgobject_dep)
|
||||
|
||||
if enable_gir
|
||||
# We generate GLib-2.0 here, as we need various GTypes
|
||||
glib_gir = gnome.generate_gir(libglib,
|
||||
@ -185,7 +192,7 @@ if enable_gir
|
||||
export_packages: 'glib-2.0',
|
||||
header: 'glib.h',
|
||||
install: true,
|
||||
dependencies: libglib_dep,
|
||||
dependencies: libgobject_dep,
|
||||
extra_args: gir_args + [
|
||||
'-DGLIB_COMPILATION',
|
||||
'-DGETTEXT_PACKAGE="dummy"',
|
||||
@ -216,13 +223,6 @@ if enable_gir
|
||||
)
|
||||
endif
|
||||
|
||||
libgobject_dep = declare_dependency(link_with : libgobject,
|
||||
include_directories : [gobjectinc],
|
||||
sources : [gobject_visibility_h, glib_enumtypes_h],
|
||||
dependencies : [libglib_dep],
|
||||
)
|
||||
meson.override_dependency('gobject-2.0', libgobject_dep)
|
||||
|
||||
gobject_query = executable('gobject-query', 'gobject-query.c',
|
||||
install : true,
|
||||
install_tag : 'bin-devel',
|
||||
|
Loading…
Reference in New Issue
Block a user