summaryrefslogtreecommitdiff
path: root/tools/meson.build
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-10-23 04:53:04 -0400
committerPatrick Griffis <tingping@tingping.se>2017-10-26 09:19:02 -0400
commit361d6ef272586c3f6dbee92c2541ac1f03bde3d4 (patch)
treeb151ddea95aa0bafa0ba5696fec6583d8ebb781a /tools/meson.build
parent1e5f8c24c435dc839530b31bc297f8cb4e643d7c (diff)
downloadgobject-introspection-361d6ef272586c3f6dbee92c2541ac1f03bde3d4.tar.gz
Initial work on meson port
Diffstat (limited to 'tools/meson.build')
-rw-r--r--tools/meson.build54
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/meson.build b/tools/meson.build
new file mode 100644
index 00000000..73817ec8
--- /dev/null
+++ b/tools/meson.build
@@ -0,0 +1,54 @@
+libdir_abs = join_paths(get_option('prefix'), get_option('libdir'))
+datadir_abs = join_paths(get_option('prefix'), get_option('datadir'))
+python_path = py3.find_python().path()
+
+tools = [
+ ['g-ir-scanner', 'scannermain', 'scanner_main'],
+ ['g-ir-annotation-tool', 'annotationmain', 'annotation_main'],
+]
+if get_option('doctool')
+ tools += [['g-ir-doc-tool', 'docmain', 'doc_main']]
+endif
+
+tool_output = []
+foreach tool : tools
+ tools_conf = configuration_data()
+ tools_conf.set('libdir', libdir_abs)
+ tools_conf.set('datarootdir', datadir_abs)
+ tools_conf.set('PYTHON', python_path)
+
+ tools_conf.set('TOOL_MODULE', tool[1])
+ tools_conf.set('TOOL_FUNCTION', tool[2])
+ tool_output += configure_file(
+ input: 'g-ir-tool-template.in',
+ output: tool[0],
+ configuration: tools_conf,
+ install: true,
+ install_dir: get_option('bindir'),
+ )
+endforeach
+
+girscanner = tool_output[0]
+
+gircompiler = executable('g-ir-compiler', 'compiler.c',
+ c_args: '-DGIREPO_DEFAULT_SEARCH_PATH="@0"'.format(libdir_abs),
+ dependencies: [
+ girepo_internals_dep,
+ girepo_dep,
+ ],
+ install: true,
+)
+
+girgenerate = executable('g-ir-generate', 'generate.c',
+ c_args: '-DGIREPO_DEFAULT_SEARCH_PATH="@0"'.format(libdir_abs),
+ dependencies: [
+ girepo_internals_dep,
+ girepo_dep,
+ ],
+ install: true,
+)
+
+girinspect = executable('g-ir-inspect', 'g-ir-inspect.c',
+ dependencies: girepo_dep,
+ install: true,
+)