[gobject-introspection] gi: fix build of pango from subprojects



commit 4d8881a69a8fa16fe4d8e2c24c4d9dc0ae1e0289
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Apr 11 19:52:11 2022 +0200

    gi: fix build of pango from subprojects
    
    Projects like pango depending on fontconfig-2.0.gir or
    any other gir provided by gobject-introspection in its
    sources directory need to have these gir's available
    in the build directory, where the rest of generated
    girs are created so they are found when using
    gobject-introspection dependency.

 gir/meson.build | 38 ++++++++++++++++++++++----------------
 1 file changed, 22 insertions(+), 16 deletions(-)
---
diff --git a/gir/meson.build b/gir/meson.build
index 765cc980..2c658c03 100644
--- a/gir/meson.build
+++ b/gir/meson.build
@@ -1,3 +1,24 @@
+gir_files = [
+  'DBus-1.0.gir',
+  'DBusGLib-1.0.gir',
+  'fontconfig-2.0.gir',
+  'freetype2-2.0.gir',
+  'GL-1.0.gir',
+  'libxml2-2.0.gir',
+  'Vulkan-1.0.gir',
+  'xft-2.0.gir',
+  'xlib-2.0.gir',
+  'xfixes-4.0.gir',
+  'xrandr-1.3.gir',
+  'win32-1.0.gir',
+]
+# Copy gir files to build directory to have them all in a single place.
+# This is needed when gobject-introspection is a subproject because Meson
+# will add --includedir pointing to build directory automatically.
+foreach gir : gir_files
+  configure_file(input: gir, output: gir, copy: true)
+endforeach
+
 cairo_conf = configuration_data()
 if get_option('cairo_libname') != ''
   cairo_library_name = get_option('cairo_libname')
@@ -21,22 +42,7 @@ cairo_gir = configure_file(
   output: 'cairo-1.0.gir',
   configuration: cairo_conf,
 )
-
-gir_files = [
-  cairo_gir,
-  'DBus-1.0.gir',
-  'DBusGLib-1.0.gir',
-  'fontconfig-2.0.gir',
-  'freetype2-2.0.gir',
-  'GL-1.0.gir',
-  'libxml2-2.0.gir',
-  'Vulkan-1.0.gir',
-  'xft-2.0.gir',
-  'xlib-2.0.gir',
-  'xfixes-4.0.gir',
-  'xrandr-1.3.gir',
-  'win32-1.0.gir',
-]
+gir_files += [cairo_gir]
 
 typelibdir = join_paths(get_option('libdir'), 'girepository-1.0')
 install_data(gir_files, install_dir: girdir)


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