meson/doc: Fix doxygen config

* Doxygen had a longstanding bug [0] where it would use `dot` even if
  not configured to do so. Due to this behaviour our config magically
  worked.
  This bug is fixed in 1.9.2 therefore we need to explicitly enable
  `dot` support in order to keep existing functionality.

* Enables WARN_AS_ERROR to catch mistakes.

* Adds a version string to the header to easily identify which commit
  the docs are built from.

[0] https://github.com/doxygen/doxygen/issues/7273
This commit is contained in:
Matthias Dressel 2022-04-24 01:09:47 +02:00
parent 601bfe21b7
commit 9c69574d0f
2 changed files with 15 additions and 4 deletions

View File

@ -1,4 +1,6 @@
PROJECT_NAME = dav1d
PROJECT_NUMBER = \@VCS_TAG\@
PROJECT_BRIEF = dav1d is an AV1 decoder
OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT@
STRIP_FROM_PATH = @DOXYGEN_STRIP@
OUTPUT_LANGUAGE = English
@ -7,10 +9,12 @@ EXTRACT_ALL = YES
OPTIMIZE_OUTPUT_FOR_C = YES
DOXYFILE_ENCODING = UTF-8
TYPEDEF_HIDES_STRUCT = YES
HAVE_DOT = YES
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_AS_ERROR = FAIL_ON_WARNINGS
INPUT = @DOXYGEN_INPUT@
FILE_PATTERNS = *.h

View File

@ -1,4 +1,4 @@
# Copyright © 2018-2021, VideoLAN and dav1d authors
# Copyright © 2018-2022, VideoLAN and dav1d authors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -33,12 +33,19 @@ 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',
doxyfile = configure_file(input: 'Doxyfile.in.in',
output: 'Doxyfile.in',
configuration: conf_data)
doxyfile_rev_target = vcs_tag(command: [
'git', '--git-dir', dav1d_git_dir, 'describe', '--long', '--always'
],
input: doxyfile,
output: 'Doxyfile'
)
custom_target('doc',
build_by_default: false,
command: [doxygen, doxyfile],
command: [doxygen, doxyfile_rev_target],
output: ['html']
)