meson: port off of deprecated functions

meson.source_root() is deprecated since 0.56, and should be replaced
with either project_source_root or global_source_root depending on
whether it is supposed to refer to a different subproject if the current
project is a subproject. The default for source_root itself was the
latter, which is broken in subproject builds, and is also incorrect for
us since our usage is to construct the path to a file that is part of
the zoitechat source tree.

Make this work semantically correctly by specifically accessing the root
of the current (sub)project, and fix a deprecation warning in the
process.

Signed-off-by: Eli Schwartz <[email protected]>
This commit is contained in:
Eli Schwartz committed 2026-10-27 12:14:33 -04:00
1 parent 2b4e79faa7
commit ede2251c36
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ perl_cflags += ['-Wno-strict-prototypes']
perl_cflags += [
# Perl has its own 'config.h' that we must override
# TODO: Just rename ours to something more unique.
'-include', meson.build_root() + '/config.h'
'-include', meson.project_build_root() + '/config.h'
]
if not cc.links('''