meson: replace deprecated meson.source_root

Instead, meson.current_source_root or meson.project_source_root should
be used:
https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonsource_root

Also, the documentation referenced above suggest to use `files()` as a
better alternative to refer to files, so do that at the same time.

This gets rid of the deprecation warning:
  NOTICE: Future-deprecated features used:
   * 0.56.0: {'meson.source_root'}
This commit is contained in:
Íñigo Huguet
2024-04-02 17:09:58 +02:00
committed by Íñigo Huguet
parent 07f463bc94
commit 3b72f19694
5 changed files with 8 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ foreach man: mans
endforeach
if enable_introspection
merge_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py')
merge_cmd = files(source_root / 'tools' / 'generate-docs-nm-settings-docs-merge.py')
name = 'dbus'
nm_settings_docs_xml_dbus = custom_target(

View File

@@ -77,7 +77,7 @@ pkg = import('pkgconfig')
source_root = meson.current_source_dir()
build_root = meson.current_build_dir()
po_dir = join_paths(meson.source_root(), 'po')
po_dir = source_root / 'po'
top_inc = include_directories('.')

View File

@@ -177,8 +177,8 @@ if enable_introspection
endif
ld_library_path = meson.current_build_dir() + ld_library_path
gen_infos_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-property-infos.py')
gen_gir_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py')
gen_infos_cmd = files(source_root / 'tools' / 'generate-docs-nm-property-infos.py')
gen_gir_cmd = files(source_root / 'tools' / 'generate-docs-nm-settings-docs-gir.py')
names = [ 'dbus', 'nmcli', 'keyfile' ]
if enable_ifcfg_rh

View File

@@ -50,9 +50,9 @@ if enable_introspection
'check-local-libnm-gir',
python,
args: [
join_paths(meson.source_root(), 'src', 'libnm-client-impl', 'tests', 'test-gir.py'),
join_paths(source_root, 'src', 'libnm-client-impl', 'tests', 'test-gir.py'),
'--gir', libnm_gir[0],
'--ver', join_paths(meson.source_root(), 'src', 'libnm-client-impl', 'libnm.ver'),
'--ver', join_paths(source_root, 'src', 'libnm-client-impl', 'libnm.ver'),
],
)
endif

View File

@@ -3,7 +3,7 @@
if enable_docs
assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
merge_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py')
merge_cmd = files(source_root / 'tools' / 'generate-docs-nm-settings-docs-merge.py')
settings_docs_input_xml = custom_target(
'settings-docs-input.xml',
input: [merge_cmd, nm_settings_docs_xml_gir['nmcli'], nm_property_infos_xml['nmcli']],
@@ -17,7 +17,7 @@ if enable_docs
],
)
gen_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-settings-docs.py')
gen_cmd = files(source_root / 'tools' / 'generate-docs-settings-docs.py')
settings_docs_source = custom_target(
'settings-docs.h',
input: [gen_cmd, settings_docs_input_xml],