summaryrefslogtreecommitdiff
path: root/giscanner/meson.build
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 /giscanner/meson.build
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 'giscanner/meson.build')
-rw-r--r--giscanner/meson.build17
1 files changed, 13 insertions, 4 deletions
diff --git a/giscanner/meson.build b/giscanner/meson.build
index acf14863..5357ae52 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -1,6 +1,4 @@
-pkglibdir = join_paths(get_option('libdir'), meson.project_name())
-giscannerdir = join_paths(pkglibdir, 'giscanner')
-install_data([
+giscanner_files = [
'__init__.py',
'annotationmain.py',
'annotationparser.py',
@@ -27,8 +25,19 @@ install_data([
'transformer.py',
'utils.py',
'xmlwriter.py',
-], install_dir: giscannerdir)
+]
+
+pkglibdir = join_paths(get_option('libdir'), meson.project_name())
+giscannerdir = join_paths(pkglibdir, 'giscanner')
+giscanner_built_files = []
+blank_conf = configuration_data()
+foreach f : giscanner_files
+ giscanner_built_files += configure_file(input : f, output : f,
+ install : true,
+ install_dir : giscannerdir,
+ configuration : blank_conf)
+endforeach
install_subdir('doctemplates', install_dir: giscannerdir)