summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2022-04-11 19:52:11 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2022-04-11 20:48:58 +0200
commit4d8881a69a8fa16fe4d8e2c24c4d9dc0ae1e0289 (patch)
tree7a0e218b69261dc3b74a6bcc60f232b2554c4e0b
parentcb723879c0fa3c776b2ddb43e9dd0ad1594828ca (diff)
downloadgobject-introspection-4d8881a69a8fa16fe4d8e2c24c4d9dc0ae1e0289.tar.gz
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.
-rw-r--r--gir/meson.build38
1 files 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)