summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt1
2 files changed, 8 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index e88b43a1..c7312146 100644
--- a/meson.build
+++ b/meson.build
@@ -223,7 +223,12 @@ if enable_gtk_doc
subdir('docs/reference/libqmi-glib')
endif
-help2man = find_program('help2man', required: false)
+help2man = find_program(
+ 'help2man',
+# When meson >= 0.59 is popular enough, replace with
+# required: get_option('man').require(meson.can_run_host_binaries())
+ required: get_option('man'),
+)
subdir('docs/man', if_found: help2man)
configure_file(
@@ -237,6 +242,7 @@ summary({
'Documentation': enable_gtk_doc,
'bash completion': enable_bash_completion,
'gobject introspection': enable_gir,
+ 'man pages': help2man.found(),
}, section: 'Build')
summary({
diff --git a/meson_options.txt b/meson_options.txt
index 4d4f913d..bee5daac 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,5 +16,6 @@ option('udevdir', type: 'string', value: '', description: 'where udev base direc
option('introspection', type: 'feature', value: 'auto', description: 'build introspection support')
option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+option('man', type: 'feature', value: 'auto', description: 'build man pages using help2man')
option('bash_completion', type: 'boolean', value: true, description: 'install bash completion files')