aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2020-03-29 10:06:48 +0200
committerSimon Ser <contact@emersion.fr>2020-04-04 17:55:09 +0200
commit4e82d0fb15b108eb44bc8a4cb92b2d9a8af1232e (patch)
treef1172b89000d3711992bb4bb7847e318ee34fc9a
parent3c96a1d3749c2c4ef0b21c14d165ec0f34b3532b (diff)
downloadsway-4e82d0fb15b108eb44bc8a4cb92b2d9a8af1232e.tar.xz
build: make completions respect install prefixes
Tell pkgconfig about prefix and datadir as required in the .pc files, so if the prefix isn't standard nothing is installed outside of it. For fish, this requires https://github.com/fish-shell/fish-shell/pull/6778 Fixes swaywm/swaybg#13
-rw-r--r--meson.build10
1 files changed, 8 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index bb3e4f49..fbd9752a 100644
--- a/meson.build
+++ b/meson.build
@@ -263,7 +263,10 @@ if get_option('bash-completions')
'completions/bash/swaymsg',
)
if bash_comp.found()
- bash_install_dir = bash_comp.get_pkgconfig_variable('completionsdir')
+ bash_install_dir = bash_comp.get_pkgconfig_variable(
+ 'completionsdir',
+ define_variable: ['datadir', datadir]
+ )
else
bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
endif
@@ -278,7 +281,10 @@ if get_option('fish-completions')
'completions/fish/swaynag.fish',
)
if fish_comp.found()
- fish_install_dir = fish_comp.get_pkgconfig_variable('completionsdir')
+ fish_install_dir = fish_comp.get_pkgconfig_variable(
+ 'completionsdir',
+ define_variable: ['datadir', datadir]
+ )
else
fish_install_dir = join_paths(datadir, 'fish', 'vendor_completions.d')
endif