[glib/wip/3v1n0/more-unix-oses: 26/26] gmodule, gobject: Add generated headers to the lib dependency




commit f2d1989b96dbc90105bd5cfd1417766dbe79fccb
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Oct 20 00:27:53 2022 +0200

    gmodule, gobject: Add generated headers to the lib dependency
    
    We may instead try to compile files that requires it without having
    been generated yet.
    
    See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2344802
    See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2345205

 gmodule/meson.build | 1 +
 gobject/meson.build | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gmodule/meson.build b/gmodule/meson.build
index 54b25a0c55..91fb236c38 100644
--- a/gmodule/meson.build
+++ b/gmodule/meson.build
@@ -131,6 +131,7 @@ pkg.generate(libraries : [libgmodule, export_dynamic_ldflags],
 
 libgmodule_dep = declare_dependency(link_with : libgmodule,
   include_directories : [gmoduleinc],
+  sources : [gvisibility_h],
   dependencies : [libglib_dep])
 
 meson.override_dependency('gmodule-no-export-2.0', libgmodule_dep)
diff --git a/gobject/meson.build b/gobject/meson.build
index 09c07f3064..3770c33590 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -128,8 +128,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 +157,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',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]