summaryrefslogtreecommitdiff
path: root/girepository
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-11-24 02:29:01 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 19:05:19 +0530
commite84c9e75efc9d82262a5ec6036cc737c6089ab30 (patch)
tree2df9b15c83f43f433869fc3458844b6e625b70b3 /girepository
parent3a7d3eee01dd5213547290c2b01db0810d4f50cc (diff)
downloadgobject-introspection-e84c9e75efc9d82262a5ec6036cc737c6089ab30.tar.gz
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.
Diffstat (limited to 'girepository')
-rw-r--r--girepository/meson.build8
1 files changed, 6 insertions, 2 deletions
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(