From cca3b5f630fc30c312a27e9f375dd1fdf7bbfc9c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 20 Jun 2017 11:17:39 +1000 Subject: [PATCH] meson: build docs by default, but allow disabling it This is the behavior of configure as well. Signed-off-by: Peter Hutterer Reviewed-by: Eric Engestrom --- 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]')