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.
This commit is contained in:
Nirbheek Chauhan 2017-11-24 02:29:01 +05:30
parent 3a78885133
commit c01bc6ef0e

View File

@ -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(