This is the behavior of configure as well.

Signed-off-by: Peter Hutterer <[email protected]>
---
 meson.build       | 5 ++---
 meson_options.txt | 4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index aba7f48c..217bf82a 100644
--- a/meson.build
+++ b/meson.build
@@ -222,9 +222,8 @@ pkgconfig.generate(
 
 ############ documentation ############
 
-doxygen = find_program('doxygen',
-                      required : false)
-if doxygen.found()
+if get_option('documentation')
+       doxygen = find_program('doxygen')
        doxygen_version_cmd = run_command(doxygen.path(), '--version')
        if doxygen_version_cmd.returncode() != 0
                error('Command "doxygen --version" failed.')
diff --git a/meson_options.txt b/meson_options.txt
index ad3095e3..9861d2d3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -14,3 +14,7 @@ option('tests',
        type: 'boolean',
        default: true,
        description: 'Build the tests [default=true]')
+option('documentation',
+       type: 'boolean',
+       default: true,
+       description: 'Build the documentation [default=true]')
-- 
2.13.0

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to