From e84c9e75efc9d82262a5ec6036cc737c6089ab30 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 24 Nov 2017 02:29:01 +0530 Subject: g-ir-scanner: Don't require SRCDIR and BUILDDIR env vars When building with Meson, we cannot set environment variables while running custom targets and our builddir layout is different from Autotools anyway. Now g-ir-scanner and friends can autodetect when they're being run uninstalled by Meson and will find _giscanner.so and the giscanner python files in the build directory. This is very similar to what gdbus-codegen uses in glib/gio. Same for girepository/gdump.c. --- girepository/meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'girepository') diff --git a/girepository/meson.build b/girepository/meson.build index b020caa4..6a8c5b5d 100644 --- a/girepository/meson.build +++ b/girepository/meson.build @@ -136,8 +136,12 @@ girepo_lib = shared_library('girepository-1.0', install: true, ) -install_data('gdump.c', - install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0') +# Copy to builddir for use with giscanner/dumper.py when running uninstalled +configure_file(input : 'gdump.c', + output : 'gdump.c', + configuration : configuration_data(), + install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'), + install : true, ) girepo_dep = declare_dependency( -- cgit v1.2.1