mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 05:56:01 +01:00
Fix installation of bash/fish completions using pkg-config
Both shells provide pkg-config files which declare their designated completionsdir. Use this as the primary source of truth.
This commit is contained in:
parent
99a49838f2
commit
bf46e4de70
1 changed files with 16 additions and 2 deletions
|
@ -70,6 +70,20 @@ fish_completion = configure_file(
|
|||
configuration: conf_data
|
||||
)
|
||||
|
||||
install_data(bash_completion, install_dir: join_paths(datadir, 'bash-completion', 'completions'))
|
||||
bash_comp = dependency('bash-completion', required: false)
|
||||
if bash_comp.found()
|
||||
bash_compdir = bash_comp.get_pkgconfig_variable('completionsdir')
|
||||
else
|
||||
bash_compdir = join_paths(datadir, 'bash-completion', 'completions')
|
||||
endif
|
||||
|
||||
fish_comp = dependency('fish', required: false)
|
||||
if fish_comp.found()
|
||||
fish_compdir = fish_comp.get_pkgconfig_variable('completionsdir')
|
||||
else
|
||||
fish_compdir = join_paths(datadir, 'fish', 'completions')
|
||||
endif
|
||||
|
||||
install_data(bash_completion, install_dir: bash_compdir)
|
||||
install_data(zsh_completion, install_dir: join_paths(datadir, 'zsh', 'site-functions'))
|
||||
install_data(fish_completion, install_dir: join_paths(datadir, 'fish', 'completions'))
|
||||
install_data(fish_completion, install_dir: fish_compdir)
|
||||
|
|
Loading…
Reference in a new issue