From 5c5dc03b785bcc4300097cd50c18b502c337c2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 5 Mar 2020 14:56:13 +0100 Subject: [PATCH] build: Make bash-completion support optional Whether we install bash-completion support currently depends on whether the corresponding pkg-config dependency is found. Turning this into a feature option keeps that behavior by default, but also allows to explicitly enable or disable the support. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072 --- subprojects/extensions-tool/meson.build | 2 +- subprojects/extensions-tool/meson_options.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/subprojects/extensions-tool/meson.build b/subprojects/extensions-tool/meson.build index ffaf49bd3..4631eef58 100644 --- a/subprojects/extensions-tool/meson.build +++ b/subprojects/extensions-tool/meson.build @@ -33,7 +33,7 @@ json_dep = dependency('json-glib-1.0') cc = meson.get_compiler('c') -bash_completion = dependency('bash-completion', required: false) +bash_completion = dependency('bash-completion', required: get_option('bash_completion')) subdir('src') diff --git a/subprojects/extensions-tool/meson_options.txt b/subprojects/extensions-tool/meson_options.txt index 9963d8ff7..fb6e37060 100644 --- a/subprojects/extensions-tool/meson_options.txt +++ b/subprojects/extensions-tool/meson_options.txt @@ -5,6 +5,12 @@ option('man', yield: true, ) +option('bash_completion', + type: 'feature', + value: 'auto', + description: 'Install bash completion support', +) + option('package_name', type: 'string', description: 'The gettext domain name when used as a subproject'