From 57c02e4c07c452432d391c17b3c9dac99d334e55 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 5 Feb 2024 15:51:48 +0000 Subject: [PATCH] girepository: Export builddir typelib and GIR paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These can then be used by a parent project if GLib is used as a Meson subproject. In particular, GJS wants to use `GLib-2.0.typelib` from GLib-as-a-subproject, but doesn’t want to hardcode the path to it inside the GLib builddir. Signed-off-by: Philip Withnall Fixes: #3244 --- girepository/meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/girepository/meson.build b/girepository/meson.build index 3dd539376..2ac2576ff 100644 --- a/girepository/meson.build +++ b/girepository/meson.build @@ -207,6 +207,13 @@ libgirepository_dep = declare_dependency( dependencies: [libglib_dep, libgobject_dep, libgio_dep, libgmodule_dep], sources: [gi_visibility_h], include_directories: [girepoinc], + variables: { + # Export the path for the built GLib-2.0.typelib (etc.) for when GLib is + # used as a subproject. The variable names match those in + # pkgconfig_variables below. + 'girdir': meson.current_build_dir() / 'introspection', + 'typelibdir': meson.current_build_dir() / 'introspection', + }, ) executable('gi-dump-types',