1 libdir_abs = join_paths(get_option('prefix'), get_option('libdir'))
2 datadir_abs = join_paths(get_option('prefix'), get_option('datadir'))
5 ['g-ir-scanner', 'scannermain', 'scanner_main'],
6 ['g-ir-annotation-tool', 'annotationmain', 'annotation_main'],
9 tools += [['g-ir-doc-tool', 'docmain', 'doc_main']]
12 if cc.get_id() == 'msvc'
13 python_cmd = '/usr/bin/env ' + python.get_variable('prefix') + '\\python.exe'
15 python_cmd = '/usr/bin/env python@0@'.format(python.language_version().split('.')[0])
20 tools_conf = configuration_data()
21 tools_conf.set('libdir', libdir_abs)
22 tools_conf.set('datarootdir', datadir_abs)
23 tools_conf.set('gir_dir_prefix', gir_dir_prefix)
24 tools_conf.set('PYTHON_CMD', python_cmd)
25 tools_conf.set('GIR_DIR', girdir)
27 tools_conf.set('TOOL_MODULE', tool[1])
28 tools_conf.set('TOOL_FUNCTION', tool[2])
29 tool_bin = configure_file(
30 input: 'g-ir-tool-template.in',
32 configuration: tools_conf,
34 install_dir: get_option('bindir'),
36 tool_output += tool_bin
37 # Provide tools for others when we're a subproject and they use the Meson GNOME module
38 meson.override_find_program(tool[0], tool_bin)
41 girscanner = tool_output[0]
43 girdoctool = tool_output[-1]
47 if cc.get_id() != 'msvc'
48 custom_c_args = cc.get_supported_arguments(['-Wno-missing-field-initializers'])
52 gircompiler = executable('g-ir-compiler', 'compiler.c',
58 c_args: custom_c_args,
61 girgenerate = executable('g-ir-generate', 'generate.c',
67 c_args: custom_c_args,
70 girinspect = executable('g-ir-inspect', 'g-ir-inspect.c',
71 dependencies: girepo_dep,
73 c_args: custom_c_args,