xref: /aosp_15_r20/external/libdav1d/doc/meson.build (revision c09093415860a1c2373dacd84c4fde00c507cdfd)
1*c0909341SAndroid Build Coastguard Worker# Copyright © 2018-2022, VideoLAN and dav1d authors
2*c0909341SAndroid Build Coastguard Worker# All rights reserved.
3*c0909341SAndroid Build Coastguard Worker#
4*c0909341SAndroid Build Coastguard Worker# Redistribution and use in source and binary forms, with or without
5*c0909341SAndroid Build Coastguard Worker# modification, are permitted provided that the following conditions are met:
6*c0909341SAndroid Build Coastguard Worker#
7*c0909341SAndroid Build Coastguard Worker# 1. Redistributions of source code must retain the above copyright notice, this
8*c0909341SAndroid Build Coastguard Worker#    list of conditions and the following disclaimer.
9*c0909341SAndroid Build Coastguard Worker#
10*c0909341SAndroid Build Coastguard Worker# 2. Redistributions in binary form must reproduce the above copyright notice,
11*c0909341SAndroid Build Coastguard Worker#    this list of conditions and the following disclaimer in the documentation
12*c0909341SAndroid Build Coastguard Worker#    and/or other materials provided with the distribution.
13*c0909341SAndroid Build Coastguard Worker#
14*c0909341SAndroid Build Coastguard Worker# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15*c0909341SAndroid Build Coastguard Worker# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16*c0909341SAndroid Build Coastguard Worker# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17*c0909341SAndroid Build Coastguard Worker# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18*c0909341SAndroid Build Coastguard Worker# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19*c0909341SAndroid Build Coastguard Worker# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20*c0909341SAndroid Build Coastguard Worker# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21*c0909341SAndroid Build Coastguard Worker# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22*c0909341SAndroid Build Coastguard Worker# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23*c0909341SAndroid Build Coastguard Worker# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24*c0909341SAndroid Build Coastguard Worker
25*c0909341SAndroid Build Coastguard Workerif not get_option('enable_docs')
26*c0909341SAndroid Build Coastguard Worker    subdir_done()
27*c0909341SAndroid Build Coastguard Workerendif
28*c0909341SAndroid Build Coastguard Worker
29*c0909341SAndroid Build Coastguard Workerdoxygen = find_program('doxygen')
30*c0909341SAndroid Build Coastguard Workerdot = find_program('dot')
31*c0909341SAndroid Build Coastguard Worker
32*c0909341SAndroid Build Coastguard Workerconf_data = configuration_data()
33*c0909341SAndroid Build Coastguard Workerconf_data.set('DOXYGEN_INPUT', dav1d_src_root / 'include/dav1d')
34*c0909341SAndroid Build Coastguard Workerconf_data.set('DOXYGEN_STRIP', dav1d_src_root / 'include')
35*c0909341SAndroid Build Coastguard Workerconf_data.set('DOXYGEN_OUTPUT', meson.current_build_dir())
36*c0909341SAndroid Build Coastguard Workerdoxyfile = configure_file(input: 'Doxyfile.in.in',
37*c0909341SAndroid Build Coastguard Worker                          output: 'Doxyfile.in',
38*c0909341SAndroid Build Coastguard Worker                          configuration: conf_data)
39*c0909341SAndroid Build Coastguard Worker
40*c0909341SAndroid Build Coastguard Workerdoxyfile_rev_target = vcs_tag(command: [
41*c0909341SAndroid Build Coastguard Worker        'git', '--git-dir', dav1d_git_dir, 'describe', '--long', '--always'
42*c0909341SAndroid Build Coastguard Worker    ],
43*c0909341SAndroid Build Coastguard Worker    input: doxyfile,
44*c0909341SAndroid Build Coastguard Worker    output: 'Doxyfile'
45*c0909341SAndroid Build Coastguard Worker)
46*c0909341SAndroid Build Coastguard Worker
47*c0909341SAndroid Build Coastguard Workercustom_target('doc',
48*c0909341SAndroid Build Coastguard Worker              build_by_default: false,
49*c0909341SAndroid Build Coastguard Worker              command: [doxygen, doxyfile_rev_target],
50*c0909341SAndroid Build Coastguard Worker              output: ['html']
51*c0909341SAndroid Build Coastguard Worker)
52