mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-27 00:16:37 +00:00
meson: Use new define_variable: feature instead of run_command()
This commit is contained in:
parent
6935d3f1db
commit
054fa3aa2e
1 changed files with 4 additions and 19 deletions
23
meson.build
23
meson.build
|
@ -436,29 +436,14 @@ bash_completions_dir = ''
|
||||||
bash_helpers_dir = ''
|
bash_helpers_dir = ''
|
||||||
|
|
||||||
if bashcomp_found
|
if bashcomp_found
|
||||||
# get_pkgconfig_variable() won't let us set the prefix
|
bash_completions_dir = bashcomp_dep.get_pkgconfig_variable('completionsdir', define_variable: ['prefix', ''])
|
||||||
pkgconfig = find_program('pkg-config')
|
if bash_completions_dir == ''
|
||||||
|
|
||||||
runcmd = run_command(pkgconfig,
|
|
||||||
'--define-variable=prefix=.',
|
|
||||||
'--variable=completionsdir',
|
|
||||||
'bash-completion')
|
|
||||||
|
|
||||||
if (runcmd.returncode() == 0)
|
|
||||||
bash_completions_dir = runcmd.stdout().strip()
|
|
||||||
else
|
|
||||||
message('Found bash-completion but the .pc file did not set \'completionsdir\'.')
|
message('Found bash-completion but the .pc file did not set \'completionsdir\'.')
|
||||||
bashcomp_found = false
|
bashcomp_found = false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
runcmd = run_command(pkgconfig,
|
bash_helpers_dir = bashcomp_dep.get_pkgconfig_variable('helpersdir', define_variable: ['prefix', ''])
|
||||||
'--define-variable=prefix=.',
|
if bash_helpers_dir == ''
|
||||||
'--variable=helpersdir',
|
|
||||||
'bash-completion')
|
|
||||||
|
|
||||||
if (runcmd.returncode() == 0)
|
|
||||||
bash_helpers_dir = runcmd.stdout().strip()
|
|
||||||
else
|
|
||||||
message('Found bash-completion, but the .pc file did not set \'helpersdir\'.')
|
message('Found bash-completion, but the .pc file did not set \'helpersdir\'.')
|
||||||
bashcomp_found = false
|
bashcomp_found = false
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue