meson: Replace meson.source_root() with meson.project_source_root()

The source_root() method is deprecated in 0.56.0 and we're
recommended to use project_source_root() instead.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2022-10-07 09:37:43 +02:00
parent 5ecdcf8541
commit 3395c35f2f
11 changed files with 20 additions and 20 deletions

View File

@ -29,7 +29,7 @@ endif
awk_prog = find_program('awk') awk_prog = find_program('awk')
syntax_check_conf = configuration_data({ syntax_check_conf = configuration_data({
'top_srcdir': meson.source_root(), 'top_srcdir': meson.project_source_root(),
'top_builddir': meson.project_build_root(), 'top_builddir': meson.project_build_root(),
'flake8_path': flake8_path, 'flake8_path': flake8_path,
'runutf8': ' '.join(runutf8), 'runutf8': ' '.join(runutf8),

View File

@ -263,7 +263,7 @@ hvsupport_html_in = custom_target(
meson_python_prog, meson_python_prog,
python3_prog, python3_prog,
hvsupport_prog, hvsupport_prog,
meson.source_root(), meson.project_source_root(),
meson.project_build_root(), meson.project_build_root(),
], ],
capture: true, capture: true,
@ -282,7 +282,7 @@ html_xslt_gen += {
'file': hvsupport_html_in, 'file': hvsupport_html_in,
} }
news_html_in = docs_rst2html5_gen.process(meson.source_root() / 'NEWS.rst') news_html_in = docs_rst2html5_gen.process(meson.project_source_root() / 'NEWS.rst')
html_xslt_gen += { html_xslt_gen += {
'name': 'news', 'name': 'news',
'file': news_html_in, 'file': news_html_in,

View File

@ -27,7 +27,7 @@ conf = configuration_data()
conf.set('_GNU_SOURCE', 1) conf.set('_GNU_SOURCE', 1)
conf.set_quoted('abs_top_builddir', meson.project_build_root()) conf.set_quoted('abs_top_builddir', meson.project_build_root())
conf.set_quoted('abs_top_srcdir', meson.source_root()) conf.set_quoted('abs_top_srcdir', meson.project_source_root())
conf.set_quoted('PACKAGE', meson.project_name()) conf.set_quoted('PACKAGE', meson.project_name())
conf.set_quoted('PACKAGE_NAME', meson.project_name()) conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version()) conf.set_quoted('PACKAGE_VERSION', meson.project_version())
@ -514,7 +514,7 @@ elif host_machine.system() == 'darwin'
# macOS libraries don't support symbol versioning # macOS libraries don't support symbol versioning
version_script_flags = '' version_script_flags = ''
else else
test_file = '@0@/src/libvirt_qemu.syms'.format(meson.source_root()) test_file = '@0@/src/libvirt_qemu.syms'.format(meson.project_source_root())
if cc.has_link_argument('-Wl,--version-script=@0@'.format(test_file)) if cc.has_link_argument('-Wl,--version-script=@0@'.format(test_file))
version_script_flags = '-Wl,--version-script=' version_script_flags = '-Wl,--version-script='
else else

View File

@ -7,7 +7,7 @@ i18n.gettext(
'--keyword=_', '--keyword=_',
'--keyword=N_', '--keyword=N_',
'--add-comments=TRANSLATORS:', '--add-comments=TRANSLATORS:',
'--directory=@0@'.format(meson.source_root()), '--directory=@0@'.format(meson.project_source_root()),
'--directory=@0@'.format(meson.project_build_root()), '--directory=@0@'.format(meson.project_build_root()),
'--files-from=@0@'.format(meson.current_source_dir() / 'POTFILES'), '--files-from=@0@'.format(meson.current_source_dir() / 'POTFILES'),
'--msgid-bugs-address=https://libvirt.org/bugs.html', '--msgid-bugs-address=https://libvirt.org/bugs.html',

View File

@ -11,7 +11,7 @@ access_polkit_sources = [
access_perm_h = files('viraccessperm.h') access_perm_h = files('viraccessperm.h')
remote_path = meson.source_root() / 'src' / 'remote' remote_path = meson.project_source_root() / 'src' / 'remote'
access_gen_headers = [] access_gen_headers = []
access_gen_sources = [] access_gen_sources = []

View File

@ -26,7 +26,7 @@ esx_gen_headers = custom_target(
], ],
command: [ command: [
meson_python_prog, python3_prog, esx_vi_generator_prog, meson_python_prog, python3_prog, esx_vi_generator_prog,
meson.source_root() / 'src', meson.project_source_root() / 'src',
meson.project_build_root() / 'src', meson.project_build_root() / 'src',
'header', 'header',
], ],
@ -47,7 +47,7 @@ esx_gen_sources = custom_target(
], ],
command: [ command: [
meson_python_prog, python3_prog, esx_vi_generator_prog, meson_python_prog, python3_prog, esx_vi_generator_prog,
meson.source_root() / 'src', meson.project_source_root() / 'src',
meson.project_build_root() / 'src', meson.project_build_root() / 'src',
'source', 'source',
], ],

View File

@ -18,7 +18,7 @@ hyperv_gen_sources = custom_target(
], ],
command: [ command: [
meson_python_prog, python3_prog, hyperv_wmi_generator_prog, meson_python_prog, python3_prog, hyperv_wmi_generator_prog,
meson.source_root() / 'src', meson.project_source_root() / 'src',
meson.project_build_root() / 'src', meson.project_build_root() / 'src',
], ],
) )

View File

@ -4,7 +4,7 @@ src_dep = declare_dependency(
compile_args: [ compile_args: [
'-DIN_LIBVIRT', '-DIN_LIBVIRT',
'-Dabs_top_builddir="@0@"'.format(meson.project_build_root()), '-Dabs_top_builddir="@0@"'.format(meson.project_build_root()),
'-Dabs_top_srcdir="@0@"'.format(meson.source_root()), '-Dabs_top_srcdir="@0@"'.format(meson.project_source_root()),
] + coverage_flags + win32_flags, ] + coverage_flags + win32_flags,
dependencies: [ dependencies: [
glib_dep, glib_dep,
@ -1033,7 +1033,7 @@ run_pkg_config_files = [
run_pkg_config_conf = configuration_data({ run_pkg_config_conf = configuration_data({
'VERSION': meson.project_version(), 'VERSION': meson.project_version(),
'abs_top_builddir': meson.project_build_root(), 'abs_top_builddir': meson.project_build_root(),
'abs_top_srcdir': meson.source_root(), 'abs_top_srcdir': meson.project_source_root(),
}) })
foreach file : run_pkg_config_files foreach file : run_pkg_config_files

View File

@ -137,8 +137,8 @@ keyname_list = [
'win32', 'win32',
] ]
keymap_gen_prog = find_program('@0@/src/keycodemapdb/tools/keymap-gen'.format(meson.source_root())) keymap_gen_prog = find_program('@0@/src/keycodemapdb/tools/keymap-gen'.format(meson.project_source_root()))
keymap_src_file = '@0@/src/keycodemapdb/data/keymaps.csv'.format(meson.source_root()) keymap_src_file = '@0@/src/keycodemapdb/data/keymaps.csv'.format(meson.project_source_root())
foreach name : keycode_list foreach name : keycode_list
keycode_gen_sources += custom_target( keycode_gen_sources += custom_target(

View File

@ -3,7 +3,7 @@ tests_dep = declare_dependency(
'-Dabs_builddir="@0@"'.format(meson.current_build_dir()), '-Dabs_builddir="@0@"'.format(meson.current_build_dir()),
'-Dabs_top_builddir="@0@"'.format(meson.project_build_root()), '-Dabs_top_builddir="@0@"'.format(meson.project_build_root()),
'-Dabs_srcdir="@0@"'.format(meson.current_source_dir()), '-Dabs_srcdir="@0@"'.format(meson.current_source_dir()),
'-Dabs_top_srcdir="@0@"'.format(meson.source_root()), '-Dabs_top_srcdir="@0@"'.format(meson.project_source_root()),
] + coverage_flags + cc_flags_relaxed_frame_limit, ] + coverage_flags + cc_flags_relaxed_frame_limit,
dependencies: [ dependencies: [
apparmor_dep, apparmor_dep,
@ -37,7 +37,7 @@ tests_env = [
'abs_builddir=@0@'.format(meson.current_build_dir()), 'abs_builddir=@0@'.format(meson.current_build_dir()),
'abs_srcdir=@0@'.format(meson.current_source_dir()), 'abs_srcdir=@0@'.format(meson.current_source_dir()),
'abs_top_builddir=@0@'.format(meson.project_build_root()), 'abs_top_builddir=@0@'.format(meson.project_build_root()),
'abs_top_srcdir=@0@'.format(meson.source_root()), 'abs_top_srcdir=@0@'.format(meson.project_source_root()),
'LC_ALL=C', 'LC_ALL=C',
'LIBVIRT_AUTOSTART=0', 'LIBVIRT_AUTOSTART=0',
] ]

View File

@ -1,10 +1,10 @@
wireshark_protocol = custom_target( wireshark_protocol = custom_target(
'protocol.h', 'protocol.h',
input: [ input: [
meson.source_root() / 'src' / 'remote' / 'remote_protocol.x', meson.project_source_root() / 'src' / 'remote' / 'remote_protocol.x',
meson.source_root() / 'src' / 'remote' / 'qemu_protocol.x', meson.project_source_root() / 'src' / 'remote' / 'qemu_protocol.x',
meson.source_root() / 'src' / 'remote' / 'lxc_protocol.x', meson.project_source_root() / 'src' / 'remote' / 'lxc_protocol.x',
meson.source_root() / 'src' / 'rpc' / 'virkeepaliveprotocol.x', meson.project_source_root() / 'src' / 'rpc' / 'virkeepaliveprotocol.x',
], ],
output: [ output: [
'protocol.h', 'protocol.h',