From 6a0ee7a2987cc9a334bf737b17887cc3607db755 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 19 Oct 2017 00:02:08 +0200 Subject: [PATCH] meson.build: remove automagic docs and manpages --- meson.build | 20 ++++++++++---------- meson_options.txt | 8 ++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 meson_options.txt diff --git a/meson.build b/meson.build index 7464b081e..26cff1d17 100644 --- a/meson.build +++ b/meson.build @@ -157,16 +157,16 @@ subdir('spa') subdir('src') subdir('pkgconfig') -doxygen = find_program('doxygen', required: false) -if doxygen.found() - subdir('doc') -else - message('Documentation disabled without doxygen') +if get_option('enable_docs') + doxygen_dep = find_program('doxygen') + if doxygen_dep.found() + subdir('doc') + endif endif -xmltoman = find_program('xmltoman', required: false) -if xmltoman.found() - subdir('man') -else - message('Man page disabled without xmltoman') +if get_option('enable_man') + xmltoman_dep = find_program('xmltoman') + if xmltoman_dep.found() + subdir('man') + endif endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 000000000..e479f65b2 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,8 @@ +option('enable_docs', + description: 'Build documentation', + type: 'boolean', + value: false) +option('enable_man', + description: 'Build manpages', + type: 'boolean', + value: false)