meson: fix usage as subproject

the non project versions of these functions evaluate to global_ variants
not project_.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2025-10-21 13:09:07 -07:00
parent eee0e8f22f
commit 88e850fd4b
2 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
project('pulseaudio', 'c',
version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version'), check : false).stdout().strip(),
meson_version : '>= 0.50.0',
meson_version : '>= 0.56.0',
default_options : [ 'c_std=gnu11', 'cpp_std=c++17' ]
)
@ -171,7 +171,7 @@ cdata.set_quoted('DESKTOPFILEDIR', join_paths(datadir, 'applications'))
cdata.set_quoted('PULSE_LOCALEDIR', localedir)
cdata.set_quoted('GETTEXT_PACKAGE', 'pulseaudio')
cdata.set('ENABLE_NLS', 1)
cdata.set('top_srcdir', meson.source_root())
cdata.set('top_srcdir', meson.project_source_root())
# Platform specifics
# First some defaults to keep config file generation happy

View file

@ -72,10 +72,10 @@ endif
if host_machine.system() != 'windows' and host_machine.system() != 'darwin'
run_target('update-map-file',
command : [ join_paths(meson.source_root(), 'scripts/generate-map-file.sh'), 'map-file', 'libpulse.def',
[ libpulse_headers, 'simple.h', join_paths(meson.build_root(), 'src', 'pulse', 'version.h') ] ])
command : [ join_paths(meson.project_source_root(), 'scripts/generate-map-file.sh'), 'map-file', 'libpulse.def',
[ libpulse_headers, 'simple.h', join_paths(meson.project_build_root(), 'src', 'pulse', 'version.h') ] ])
versioning_link_args = ['-Wl,-version-script=' + join_paths(meson.source_root(), 'src', 'pulse', 'map-file')]
versioning_link_args = ['-Wl,-version-script=' + join_paths(meson.project_source_root(), 'src', 'pulse', 'map-file')]
else
versioning_link_args = []
endif