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)