build: Optional tools should not be mandatory

Since we're using the `found()` method on tools found via the
`find_program()` function, we are expecting them to be optional,
but we are not passing `required:false` to ensure that Meson does
not bail out when the tool is not found.
This commit is contained in:
Emmanuele Bassi 2018-01-24 12:01:25 +00:00 committed by Wim Taymans
parent d99f5defa3
commit ea28338736

View file

@ -167,15 +167,19 @@ subdir('src')
subdir('pkgconfig')
if get_option('enable_docs')
doxygen = find_program('doxygen')
doxygen = find_program('doxygen', required : false)
if doxygen.found()
subdir('doc')
else
warning('Documentation was enabled, but doxygen is not available')
endif
endif
if get_option('enable_man')
xmltoman = find_program('xmltoman')
xmltoman = find_program('xmltoman', required : false)
if xmltoman.found()
subdir('man')
else
warning('Man page generation was enabled, but xmltoman is not available')
endif
endif