mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
meson.build: install symbolic links instead of compiling multiple times
Currently, among others, the `pipewire-pulse` executable is an exact copy of the `pipewire` executable. Use meson's `install_symlink()` to avoid the need for compiling the same thing multiple times. Also use `custom_target()` so that the aliases are available in an uninstalled environment. Do the same for `pw-cat`. The benefit is that all aliases of `pw-cat` are now available in an uninstalled environment. This commit increasese the minimum meson version to 0.61.1 as that is needed for `install_symlink()`. The reason for using 0.61.1 instead of 0.61.0 is the following bug: https://github.com/mesonbuild/meson/issues/9820
This commit is contained in:
parent
f3230ca2e6
commit
1ef43a5255
3 changed files with 32 additions and 29 deletions
|
|
@ -58,16 +58,26 @@ if get_option('pw-cat').allowed() and sndfile_dep.found()
|
|||
'pw-encplay',
|
||||
]
|
||||
|
||||
executable('pw-cat',
|
||||
pw_cat = executable('pw-cat',
|
||||
pwcat_sources,
|
||||
install: true,
|
||||
dependencies : [pwcat_deps, pipewire_dep, mathlib],
|
||||
)
|
||||
|
||||
foreach alias : pwcat_aliases
|
||||
dst = pipewire_bindir / alias
|
||||
cmd = 'ln -fs @0@ $DESTDIR@1@'.format('pw-cat', dst)
|
||||
meson.add_install_script('sh', '-c', cmd)
|
||||
custom_target(
|
||||
alias,
|
||||
build_by_default: true,
|
||||
install: false,
|
||||
command: [ln, '-sf', meson.project_build_root() + '/@INPUT@', '@OUTPUT@'],
|
||||
input: pw_cat,
|
||||
output: alias,
|
||||
)
|
||||
install_symlink(
|
||||
alias,
|
||||
pointing_to: pw_cat.name(),
|
||||
install_dir: pipewire_bindir,
|
||||
)
|
||||
endforeach
|
||||
elif not sndfile_dep.found() and get_option('pw-cat').enabled()
|
||||
error('pw-cat is enabled but required dependency `sndfile` was not found.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue