mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
build: make completions respect install prefix
paths straight from pkgconfig will sometimes be outside of the users build prefix, we should never try to install anything outside of that directory. filter the value obtained from pkgconfig and use some fallback if it is not inside
This commit is contained in:
parent
214e3030e1
commit
ad66d0861d
1 changed files with 6 additions and 0 deletions
|
|
@ -264,6 +264,9 @@ if get_option('bash-completions')
|
|||
)
|
||||
if bash_comp.found()
|
||||
bash_install_dir = bash_comp.get_pkgconfig_variable('completionsdir')
|
||||
if not bash_install_dir.startswith(prefix)
|
||||
bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
|
||||
endif
|
||||
else
|
||||
bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
|
||||
endif
|
||||
|
|
@ -279,6 +282,9 @@ if get_option('fish-completions')
|
|||
)
|
||||
if fish_comp.found()
|
||||
fish_install_dir = fish_comp.get_pkgconfig_variable('completionsdir')
|
||||
if not fish_install_dir.startswith(prefix)
|
||||
fish_install_dir = join_paths(datadir, 'fish', 'vendor_completions.d')
|
||||
endif
|
||||
else
|
||||
fish_install_dir = join_paths(datadir, 'fish', 'vendor_completions.d')
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue