diff options
author | Matthias Dressel <code@deadcode.eu> | 2021-12-17 18:19:28 +0300 |
---|---|---|
committer | Matthias Dressel <code@deadcode.eu> | 2021-12-29 19:25:37 +0300 |
commit | 5e67cfd8062c949a81bac6b2d5ce6e6fbfd8978e (patch) | |
tree | 71c8bf6581d019cdfa2b29ad8f859d6d9c94e877 /doc | |
parent | f266b3b29526474e3789e4627dc8073e8a76ad24 (diff) |
meson: Add explicit option to build documentation
Co-authored-by: Rudi Heitbaum <rudi@heitbaum.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/meson.build | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/doc/meson.build b/doc/meson.build index 0ef7123..363429f 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -1,4 +1,4 @@ -# Copyright © 2018, VideoLAN and dav1d authors +# Copyright © 2018-2021, VideoLAN and dav1d authors # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -22,22 +22,23 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -doxygen = find_program('doxygen', required: false) -dot = find_program('dot', required: false) +if not get_option('enable_docs') + subdir_done() +endif -if doxygen.found() and dot.found() - conf_data = configuration_data() - conf_data.set('DOXYGEN_INPUT', join_paths(dav1d_src_root, 'include/dav1d')) - conf_data.set('DOXYGEN_STRIP', join_paths(dav1d_src_root, 'include')) - conf_data.set('DOXYGEN_OUTPUT', meson.current_build_dir()) - doxyfile = configure_file(input: 'Doxyfile.in', - output: 'Doxyfile', - configuration: conf_data) +doxygen = find_program('doxygen') +dot = find_program('dot') - custom_target('doc', - build_by_default: false, - command: [doxygen, doxyfile], - output: ['html'] - ) -endif +conf_data = configuration_data() +conf_data.set('DOXYGEN_INPUT', dav1d_src_root / 'include/dav1d') +conf_data.set('DOXYGEN_STRIP', dav1d_src_root / 'include') +conf_data.set('DOXYGEN_OUTPUT', meson.current_build_dir()) +doxyfile = configure_file(input: 'Doxyfile.in', + output: 'Doxyfile', + configuration: conf_data) +custom_target('doc', + build_by_default: false, + command: [doxygen, doxyfile], + output: ['html'] +) |