summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2018-04-11 09:50:21 +0200
committerIñigo Martínez <inigomartinez@gmail.com>2018-08-11 22:56:33 +0200
commit09e7dae79490cd1a7bff7a740c2380095492156f (patch)
treee9a96b90f99699a7e0eae1f9cf3231cbe72482a8 /bin
parent2a99700d2260858bb736077ef0d5b9ddd10cf7bb (diff)
downloaddconf-09e7dae79490cd1a7bff7a740c2380095492156f.tar.gz
build: Use completions dir from pkg-config file
The `bash-completions` pkg-config file provides a variable with the location of the completion files. This variable is checked to set the installation directory of the completion file provided by dconf. As a side note, the variable in the `bash-completions` pkg-config file is not totally correct, because it provides a directory that is relative to prefix while it should be relative to datadir.
Diffstat (limited to 'bin')
-rw-r--r--bin/meson.build10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/meson.build b/bin/meson.build
index 8c41cb0..dc220cc 100644
--- a/bin/meson.build
+++ b/bin/meson.build
@@ -19,7 +19,9 @@ executable(
install: true
)
-install_data(
- 'completion/dconf',
- install_dir: join_paths(dconf_datadir, 'bash-completion', 'completions')
-)
+if enable_bash_completion
+ install_data(
+ 'completion/dconf',
+ install_dir: completions_dir
+ )
+endif