meson: build docs by default, but allow disabling it

This is the behavior of configure as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Peter Hutterer 2017-06-20 11:17:39 +10:00
parent 088c3ea16b
commit cca3b5f630
2 changed files with 6 additions and 3 deletions

View file

@ -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.')

View file

@ -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]')