mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
00d7568e4f
We're using the `install` argument for configure_file() all over the place. The support for an `install` argument for configure_file() was added in Meson 0.50, but we haven't bumped the minimum version of Meson we require, yet; which means we're getting compatibility warnings when using recent versions of Meson, and undefined behaviour when using older versions. The configure_file() object defaults to `install: false`, unless an install directory is used. This means that all instances of an `install` argument with an explicit `true` or `false` value can be removed, whereas all instances of `install` with a value determined from a configuration option must be turned into an explicit conditional.
40 lines
1.4 KiB
Meson
40 lines
1.4 KiB
Meson
gdbus_codegen_files = [
|
|
'__init__.py',
|
|
'codegen.py',
|
|
'codegen_main.py',
|
|
'codegen_docbook.py',
|
|
'dbustypes.py',
|
|
'parser.py',
|
|
'utils.py',
|
|
]
|
|
|
|
gdbus_codegen_conf = configuration_data()
|
|
gdbus_codegen_conf.set('VERSION', glib_version)
|
|
gdbus_codegen_conf.set('PYTHON', python_name)
|
|
gdbus_codegen_conf.set('DATADIR', glib_datadir)
|
|
|
|
# Install gdbus-codegen executable
|
|
gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
|
|
output : 'gdbus-codegen',
|
|
install_dir : get_option('bindir'),
|
|
configuration : gdbus_codegen_conf
|
|
)
|
|
# Provide tools for others when we're a subproject and they use the Meson GNOME module
|
|
meson.override_find_program('gdbus-codegen', gdbus_codegen)
|
|
|
|
codegen_dir = join_paths(get_option('datadir'), 'glib-2.0/codegen')
|
|
|
|
gdbus_codegen_built_files = []
|
|
gdbus_codegen_built_files += configure_file(input : 'config.py.in',
|
|
output : 'config.py',
|
|
install_dir : codegen_dir,
|
|
configuration : gdbus_codegen_conf)
|
|
|
|
foreach f : gdbus_codegen_files
|
|
# Copy these into the builddir so that gdbus-codegen can be used uninstalled
|
|
# and then install it too so that it can be used after installation
|
|
gdbus_codegen_built_files += configure_file(input : f, output : f,
|
|
install_dir : codegen_dir,
|
|
copy : true)
|
|
endforeach
|