diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-04-11 09:50:21 +0200 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2018-08-11 22:56:33 +0200 |
commit | 09e7dae79490cd1a7bff7a740c2380095492156f (patch) | |
tree | e9a96b90f99699a7e0eae1f9cf3231cbe72482a8 /meson.build | |
parent | 2a99700d2260858bb736077ef0d5b9ddd10cf7bb (diff) | |
download | dconf-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 'meson.build')
-rw-r--r-- | meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 334b32d..6cdef07 100644 --- a/meson.build +++ b/meson.build @@ -45,6 +45,12 @@ glib_dep = dependency('glib-2.0', version: '>= 2.44.0') gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir', define_variable: ['libdir', dconf_libdir]) dbus_session_service_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir', define_variable: ['datadir', dconf_datadir]) +enable_bash_completion = get_option('bash_completion') +if enable_bash_completion + # FIXME: the `.pc` file is wrong because `completionsdir` should be relative to `datadir`, not `prefix` + completions_dir = dependency('bash-completion').get_pkgconfig_variable('completionsdir', define_variable: ['prefix', dconf_prefix]) +endif + configure_file( output: 'config.h', configuration: configuration_data() |