mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-22 23:29:16 +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:
parent
7e5c5932fc
commit
341895a19e
@ -743,12 +743,15 @@ gio_headers = files(
|
|||||||
'gliststore.h',
|
'gliststore.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
gvisibility_h = configure_file(
|
gvisibility_h = custom_target(
|
||||||
output: 'gio-visibility.h',
|
output: 'gio-visibility.h',
|
||||||
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GIO', '@OUTPUT@'],
|
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GIO', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: glib_includedir / 'gio',
|
||||||
|
install_tag : 'devel',
|
||||||
)
|
)
|
||||||
|
gio_sources += gvisibility_h
|
||||||
|
|
||||||
gio_headers += gvisibility_h
|
|
||||||
gio_headers += application_headers
|
gio_headers += application_headers
|
||||||
gio_headers += settings_headers
|
gio_headers += settings_headers
|
||||||
gio_headers += gdbus_headers
|
gio_headers += gdbus_headers
|
||||||
@ -857,6 +860,7 @@ schemas_subdir = join_paths('glib-2.0', 'schemas')
|
|||||||
|
|
||||||
libgio_dep = declare_dependency(link_with : libgio,
|
libgio_dep = declare_dependency(link_with : libgio,
|
||||||
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
|
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
|
||||||
|
sources: gvisibility_h,
|
||||||
include_directories : [gioinc],
|
include_directories : [gioinc],
|
||||||
variables : [
|
variables : [
|
||||||
'schemasdir=' + join_paths(glib_datadir, schemas_subdir),
|
'schemasdir=' + join_paths(glib_datadir, schemas_subdir),
|
||||||
|
@ -1,19 +1,30 @@
|
|||||||
|
glib_sources = []
|
||||||
|
|
||||||
glibconfig_h = configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h',
|
glibconfig_h = configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h',
|
||||||
install_dir : join_paths(get_option('libdir'), 'glib-2.0/include'),
|
install_dir : join_paths(get_option('libdir'), 'glib-2.0/include'),
|
||||||
install_tag : 'devel',
|
install_tag : 'devel',
|
||||||
configuration : glibconfig_conf)
|
configuration : glibconfig_conf)
|
||||||
|
|
||||||
gversionmacros_h = configure_file(
|
gversionmacros_h = custom_target(
|
||||||
input: 'gversionmacros.h.in',
|
input: 'gversionmacros.h.in',
|
||||||
output: 'gversionmacros.h',
|
output: 'gversionmacros.h',
|
||||||
command: [gen_visibility_macros, meson.project_version(), 'versions-macros', '@INPUT@', '@OUTPUT@'],
|
command: [gen_visibility_macros, meson.project_version(), 'versions-macros', '@INPUT@', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: glib_includedir,
|
||||||
|
install_tag : 'devel',
|
||||||
)
|
)
|
||||||
|
|
||||||
gvisibility_h = configure_file(
|
gvisibility_h = custom_target(
|
||||||
output: 'glib-visibility.h',
|
output: 'glib-visibility.h',
|
||||||
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GLIB', '@OUTPUT@'],
|
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GLIB', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: glib_includedir / 'glib',
|
||||||
|
install_tag : 'devel',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
glib_built_headers = [gversionmacros_h, gvisibility_h]
|
||||||
|
glib_sources += glib_built_headers
|
||||||
|
|
||||||
glib_c_args_internal = [
|
glib_c_args_internal = [
|
||||||
'-DGLIB_COMPILATION',
|
'-DGLIB_COMPILATION',
|
||||||
]
|
]
|
||||||
@ -231,8 +242,6 @@ glib_sub_headers = files(
|
|||||||
'gprintf.h',
|
'gprintf.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
glib_sub_headers += [gversionmacros_h, gvisibility_h]
|
|
||||||
|
|
||||||
install_headers(glib_sub_headers, subdir : 'glib-2.0/glib')
|
install_headers(glib_sub_headers, subdir : 'glib-2.0/glib')
|
||||||
|
|
||||||
deprecated_sources = files(
|
deprecated_sources = files(
|
||||||
@ -243,7 +252,7 @@ deprecated_sources = files(
|
|||||||
'deprecated/gthread-deprecated.c'
|
'deprecated/gthread-deprecated.c'
|
||||||
)
|
)
|
||||||
|
|
||||||
glib_sources = files(
|
glib_sources += files(
|
||||||
'garcbox.c',
|
'garcbox.c',
|
||||||
'garray.c',
|
'garray.c',
|
||||||
'gasyncqueue.c',
|
'gasyncqueue.c',
|
||||||
@ -416,6 +425,7 @@ libglib = library('glib-2.0',
|
|||||||
libglib_dep = declare_dependency(
|
libglib_dep = declare_dependency(
|
||||||
link_with : libglib,
|
link_with : libglib,
|
||||||
dependencies : libintl_deps,
|
dependencies : libintl_deps,
|
||||||
|
sources : glib_built_headers,
|
||||||
# We sadly need to export configinc here because everyone includes <glib/*.h>
|
# We sadly need to export configinc here because everyone includes <glib/*.h>
|
||||||
include_directories : [configinc, glibinc])
|
include_directories : [configinc, glibinc])
|
||||||
|
|
||||||
|
@ -66,13 +66,15 @@ gmodule_c = files('gmodule.c')
|
|||||||
|
|
||||||
install_headers([gmodule_h], subdir : 'glib-2.0')
|
install_headers([gmodule_h], subdir : 'glib-2.0')
|
||||||
|
|
||||||
gvisibility_h = configure_file(
|
gvisibility_h = custom_target(
|
||||||
output: 'gmodule-visibility.h',
|
output: 'gmodule-visibility.h',
|
||||||
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GMODULE', '@OUTPUT@'],
|
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GMODULE', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: glib_includedir / 'gmodule',
|
||||||
|
install_tag : 'devel',
|
||||||
)
|
)
|
||||||
install_headers(gvisibility_h, subdir : 'glib-2.0/gmodule')
|
|
||||||
|
|
||||||
gmodule_sources = [gmodule_c]
|
gmodule_sources = [gmodule_c, gvisibility_h]
|
||||||
if host_system == 'windows'
|
if host_system == 'windows'
|
||||||
gmodule_win_rc = configure_file(
|
gmodule_win_rc = configure_file(
|
||||||
input: 'gmodule.rc.in',
|
input: 'gmodule.rc.in',
|
||||||
@ -131,6 +133,7 @@ pkg.generate(libraries : [libgmodule, export_dynamic_ldflags],
|
|||||||
|
|
||||||
libgmodule_dep = declare_dependency(link_with : libgmodule,
|
libgmodule_dep = declare_dependency(link_with : libgmodule,
|
||||||
include_directories : [gmoduleinc],
|
include_directories : [gmoduleinc],
|
||||||
|
sources : [gvisibility_h],
|
||||||
dependencies : [libglib_dep])
|
dependencies : [libglib_dep])
|
||||||
|
|
||||||
meson.override_dependency('gmodule-no-export-2.0', libgmodule_dep)
|
meson.override_dependency('gmodule-no-export-2.0', libgmodule_dep)
|
||||||
|
@ -23,16 +23,20 @@ gobject_install_headers = files(
|
|||||||
'gobjectnotifyqueue.c', # sic
|
'gobjectnotifyqueue.c', # sic
|
||||||
)
|
)
|
||||||
|
|
||||||
gvisibility_h = configure_file(
|
gobject_sources = []
|
||||||
|
|
||||||
|
gvisibility_h = custom_target(
|
||||||
output: 'gobject-visibility.h',
|
output: 'gobject-visibility.h',
|
||||||
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GOBJECT', '@OUTPUT@'],
|
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GOBJECT', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: glib_includedir / 'gobject',
|
||||||
|
install_tag : 'devel',
|
||||||
)
|
)
|
||||||
|
gobject_sources += gvisibility_h
|
||||||
gobject_install_headers += gvisibility_h
|
|
||||||
|
|
||||||
install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject')
|
install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject')
|
||||||
|
|
||||||
gobject_sources = files(
|
gobject_sources += files(
|
||||||
'gatomicarray.c',
|
'gatomicarray.c',
|
||||||
'gbinding.c',
|
'gbinding.c',
|
||||||
'gbindinggroup.c',
|
'gbindinggroup.c',
|
||||||
@ -128,8 +132,6 @@ glib_enumtypes_c = custom_target('glib_enumtypes_c',
|
|||||||
'--template', files('glib-enumtypes.c.template'),
|
'--template', files('glib-enumtypes.c.template'),
|
||||||
'@INPUT@'])
|
'@INPUT@'])
|
||||||
|
|
||||||
glib_enumtypes_dep = declare_dependency(sources : [glib_enumtypes_h])
|
|
||||||
|
|
||||||
# Expose as variable to be used by gobject-introspection
|
# Expose as variable to be used by gobject-introspection
|
||||||
# when it includes GLib as a subproject
|
# when it includes GLib as a subproject
|
||||||
glib_types_h = files('glib-types.h')
|
glib_types_h = files('glib-types.h')
|
||||||
@ -159,7 +161,9 @@ pkg.generate(libgobject,
|
|||||||
|
|
||||||
libgobject_dep = declare_dependency(link_with : libgobject,
|
libgobject_dep = declare_dependency(link_with : libgobject,
|
||||||
include_directories : [gobjectinc],
|
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)
|
meson.override_dependency('gobject-2.0', libgobject_dep)
|
||||||
|
|
||||||
executable('gobject-query', 'gobject-query.c',
|
executable('gobject-query', 'gobject-query.c',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user