mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 02:47:52 +02:00
glib, gmodule, gobject: Add generated headers to the lib dependency
This requires changing them from being generated sources at compile time to custom targets, but it also ensures that they are actually there when needed, in fact currently we may instead try to compile files that requires them without having been generated yet. See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2346914 (glib) See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2344802 (gmodule) See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2345205 (gobject)
This commit is contained in:
@@ -23,16 +23,20 @@ gobject_install_headers = files(
|
||||
'gobjectnotifyqueue.c', # sic
|
||||
)
|
||||
|
||||
gvisibility_h = configure_file(
|
||||
gobject_sources = []
|
||||
|
||||
gvisibility_h = custom_target(
|
||||
output: 'gobject-visibility.h',
|
||||
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GOBJECT', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: glib_includedir / 'gobject',
|
||||
install_tag : 'devel',
|
||||
)
|
||||
|
||||
gobject_install_headers += gvisibility_h
|
||||
gobject_sources += gvisibility_h
|
||||
|
||||
install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject')
|
||||
|
||||
gobject_sources = files(
|
||||
gobject_sources += files(
|
||||
'gatomicarray.c',
|
||||
'gbinding.c',
|
||||
'gbindinggroup.c',
|
||||
@@ -128,8 +132,6 @@ glib_enumtypes_c = custom_target('glib_enumtypes_c',
|
||||
'--template', files('glib-enumtypes.c.template'),
|
||||
'@INPUT@'])
|
||||
|
||||
glib_enumtypes_dep = declare_dependency(sources : [glib_enumtypes_h])
|
||||
|
||||
# Expose as variable to be used by gobject-introspection
|
||||
# when it includes GLib as a subproject
|
||||
glib_types_h = files('glib-types.h')
|
||||
@@ -159,7 +161,9 @@ pkg.generate(libgobject,
|
||||
|
||||
libgobject_dep = declare_dependency(link_with : libgobject,
|
||||
include_directories : [gobjectinc],
|
||||
dependencies : [libglib_dep, glib_enumtypes_dep])
|
||||
sources : [gvisibility_h, glib_enumtypes_h],
|
||||
dependencies : [libglib_dep],
|
||||
)
|
||||
meson.override_dependency('gobject-2.0', libgobject_dep)
|
||||
|
||||
executable('gobject-query', 'gobject-query.c',
|
||||
|
Reference in New Issue
Block a user