Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 1 | # |
James Zern | f4ad7fc | 2024-06-12 16:37:08 -0700 | [diff] [blame] | 2 | # Copyright (c) 2017, Alliance for Open Media. All rights reserved. |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 3 | # |
| 4 | # This source code is subject to the terms of the BSD 2 Clause License and the |
| 5 | # Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License was |
| 6 | # not distributed with this source code in the LICENSE file, you can obtain it |
| 7 | # at www.aomedia.org/license/software. If the Alliance for Open Media Patent |
| 8 | # License 1.0 was not distributed with this source code in the PATENTS file, you |
| 9 | # can obtain it at www.aomedia.org/license/patent. |
| 10 | # |
| 11 | if(AOM_DOCS_CMAKE_) |
Johann | 29a5973 | 2018-04-27 10:51:00 -0700 | [diff] [blame] | 12 | return() |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 13 | endif() # AOM_DOCS_CMAKE_ |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 14 | set(AOM_DOCS_CMAKE_ 1) |
| 15 | |
| 16 | cmake_minimum_required(VERSION 3.5) |
| 17 | |
| 18 | set(AOM_DOXYFILE "${AOM_CONFIG_DIR}/doxyfile") |
| 19 | set(AOM_DOXYGEN_CONFIG_TEMPLATE "libs.doxy_template") |
| 20 | set(AOM_DOXYGEN_OUTPUT_DIR "${AOM_CONFIG_DIR}/dox") |
| 21 | set(AOM_DOXYGEN_SECTIONS "av1") |
| 22 | |
Urvang Joshi | abf31fa | 2020-06-01 17:34:51 -0700 | [diff] [blame] | 23 | set(AOM_DOXYGEN_SOURCES |
| 24 | "${AOM_ROOT}/aom/aom.h" |
| 25 | "${AOM_ROOT}/aom/aom_codec.h" |
| 26 | "${AOM_ROOT}/aom/aom_decoder.h" |
| 27 | "${AOM_ROOT}/aom/aom_encoder.h" |
Cheng Chen | fd9ed83 | 2021-03-11 23:08:09 -0800 | [diff] [blame] | 28 | "${AOM_ROOT}/aom/aom_external_partition.h" |
Urvang Joshi | abf31fa | 2020-06-01 17:34:51 -0700 | [diff] [blame] | 29 | "${AOM_ROOT}/aom/aom_frame_buffer.h" |
| 30 | "${AOM_ROOT}/aom/aom_image.h" |
| 31 | "${AOM_ROOT}/aom/aom_integer.h" |
| 32 | "${AOM_ROOT}/av1/common/av1_common_int.h" |
Debargha Mukherjee | 9a2e29b | 2020-06-18 08:11:15 -0700 | [diff] [blame] | 33 | "${AOM_ROOT}/av1/common/av1_loopfilter.h" |
Urvang Joshi | 6589c3b | 2020-06-04 16:41:44 -0700 | [diff] [blame] | 34 | "${AOM_ROOT}/av1/common/blockd.h" |
Debargha Mukherjee | 82b2438 | 2020-06-16 23:30:39 -0700 | [diff] [blame] | 35 | "${AOM_ROOT}/av1/common/cdef.h" |
Debargha Mukherjee | 9a2e29b | 2020-06-18 08:11:15 -0700 | [diff] [blame] | 36 | "${AOM_ROOT}/av1/common/enums.h" |
| 37 | "${AOM_ROOT}/av1/common/restoration.h" |
Urvang Joshi | abf31fa | 2020-06-01 17:34:51 -0700 | [diff] [blame] | 38 | "${AOM_ROOT}/keywords.dox" |
| 39 | "${AOM_ROOT}/mainpage.dox" |
| 40 | "${AOM_ROOT}/usage.dox") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 41 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 42 | if(CONFIG_AV1_DECODER) |
| 43 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 44 | "${AOM_ROOT}/apps/aomdec.c" |
| 45 | "${AOM_ROOT}/examples/decode_to_md5.c" |
| 46 | "${AOM_ROOT}/examples/decode_with_drops.c" |
| 47 | "${AOM_ROOT}/examples/simple_decoder.c") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 48 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 49 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 50 | "Full featured decoder." |
| 51 | "Frame by frame MD5 checksum." |
| 52 | "Drops frames while decoding." |
| 53 | "Simplified decoder loop.") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 54 | |
| 55 | set(AOM_DOXYGEN_SECTIONS ${AOM_DOXYGEN_SECTIONS} "av1_decoder decoder") |
| 56 | |
Johann | b72d2e1 | 2018-09-11 12:41:38 -0700 | [diff] [blame] | 57 | set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} "${AOM_ROOT}/aom/aomdx.h" |
Urvang Joshi | c819a6c | 2020-06-10 10:50:55 -0700 | [diff] [blame] | 58 | "${AOM_ROOT}/usage_dx.dox" |
| 59 | "${AOM_ROOT}/av1/decoder/decoder.h") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 60 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 61 | if(CONFIG_ANALYZER) |
| 62 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 63 | "${AOM_ROOT}/examples/analyzer.cc") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 64 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 65 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 66 | "Bitstream analyzer.") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 67 | endif() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 68 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 69 | if(CONFIG_INSPECTION) |
| 70 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 71 | "${AOM_ROOT}/examples/inspect.c") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 72 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 73 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 74 | "Bitstream inspector.") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 75 | endif() |
Yunqing Wang | c8f7a3b | 2020-05-04 15:23:48 -0700 | [diff] [blame] | 76 | |
Yunqing Wang | 41aa31a | 2020-05-11 15:29:31 -0700 | [diff] [blame] | 77 | set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} |
| 78 | "${AOM_ROOT}/doc/dev_guide/av1_decoder.dox") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 79 | endif() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 80 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 81 | if(CONFIG_AV1_ENCODER) |
| 82 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 83 | "${AOM_ROOT}/apps/aomenc.c" |
| 84 | "${AOM_ROOT}/examples/lossless_encoder.c" |
| 85 | "${AOM_ROOT}/examples/set_maps.c" |
| 86 | "${AOM_ROOT}/examples/simple_encoder.c" |
| 87 | "${AOM_ROOT}/examples/twopass_encoder.c") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 88 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 89 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 90 | "Full featured encoder." |
| 91 | "Simplified lossless encoder." |
| 92 | "Set active and ROI maps." |
| 93 | "Simplified encoder loop." |
| 94 | "Two-pass encoder loop.") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 95 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 96 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 97 | "${AOM_ROOT}/examples/scalable_encoder.c") |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 98 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 99 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 100 | "Scalable encoder loop.") |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 101 | |
Marco Paniconi | 6714211 | 2019-07-24 15:00:31 -0700 | [diff] [blame] | 102 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Jerome Jiang | 61d6c01 | 2023-06-08 15:10:30 -0400 | [diff] [blame] | 103 | "${AOM_ROOT}/examples/svc_encoder_rtc.cc") |
Marco Paniconi | 6714211 | 2019-07-24 15:00:31 -0700 | [diff] [blame] | 104 | |
| 105 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
| 106 | "Layered encoder for RTC.") |
| 107 | |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 108 | set(AOM_DOXYGEN_SECTIONS ${AOM_DOXYGEN_SECTIONS} "av1_encoder encoder") |
| 109 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 110 | set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} "${AOM_ROOT}/aom/aomcx.h" |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 111 | "${AOM_ROOT}/usage_cx.dox") |
Yunqing Wang | 41aa31a | 2020-05-11 15:29:31 -0700 | [diff] [blame] | 112 | set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} |
| 113 | "${AOM_ROOT}/doc/dev_guide/av1_encoder.dox") |
chiyotsai | de1caf8 | 2020-06-09 14:59:22 -0700 | [diff] [blame] | 114 | set(AOM_DOXYGEN_SOURCES |
| 115 | ${AOM_DOXYGEN_SOURCES} |
Paul Wilkins | edf0f4a | 2020-07-21 16:47:52 +0100 | [diff] [blame] | 116 | "${AOM_ROOT}/aom_scale/yv12config.h" |
Yue Chen | 2d8405c | 2020-06-10 14:42:05 -0700 | [diff] [blame] | 117 | "${AOM_ROOT}/av1/encoder/bitstream.h" |
chiyotsai | c2f3841 | 2020-06-10 16:07:21 -0700 | [diff] [blame] | 118 | "${AOM_ROOT}/av1/encoder/block.h" |
Marco Paniconi | 5b2faba | 2020-07-09 11:39:22 -0700 | [diff] [blame] | 119 | "${AOM_ROOT}/av1/encoder/aq_cyclicrefresh.h" |
chiyotsai | de1caf8 | 2020-06-09 14:59:22 -0700 | [diff] [blame] | 120 | "${AOM_ROOT}/av1/encoder/encode_strategy.c" |
| 121 | "${AOM_ROOT}/av1/encoder/encode_strategy.h" |
| 122 | "${AOM_ROOT}/av1/encoder/encodeframe.c" |
| 123 | "${AOM_ROOT}/av1/encoder/encoder.c" |
| 124 | "${AOM_ROOT}/av1/encoder/encoder.h" |
angiebird | 96bdb2a | 2020-06-28 17:24:24 -0700 | [diff] [blame] | 125 | "${AOM_ROOT}/av1/encoder/encodetxb.h" |
chiyotsai | de1caf8 | 2020-06-09 14:59:22 -0700 | [diff] [blame] | 126 | "${AOM_ROOT}/av1/encoder/firstpass.h" |
Paul Wilkins | be20bc2 | 2020-07-16 14:46:57 +0100 | [diff] [blame] | 127 | "${AOM_ROOT}/av1/encoder/gop_structure.h" |
Debargha Mukherjee | 82b2438 | 2020-06-16 23:30:39 -0700 | [diff] [blame] | 128 | "${AOM_ROOT}/av1/encoder/interp_search.c" |
chiyotsai | de1caf8 | 2020-06-09 14:59:22 -0700 | [diff] [blame] | 129 | "${AOM_ROOT}/av1/encoder/intra_mode_search.h" |
| 130 | "${AOM_ROOT}/av1/encoder/intra_mode_search.c" |
chiyotsai | c9b9fa5 | 2020-06-12 15:19:50 -0700 | [diff] [blame] | 131 | "${AOM_ROOT}/av1/encoder/intra_mode_search_utils.h" |
chiyotsai | de1caf8 | 2020-06-09 14:59:22 -0700 | [diff] [blame] | 132 | "${AOM_ROOT}/av1/encoder/lookahead.h" |
chiyotsai | c9b9fa5 | 2020-06-12 15:19:50 -0700 | [diff] [blame] | 133 | "${AOM_ROOT}/av1/encoder/palette.h" |
| 134 | "${AOM_ROOT}/av1/encoder/palette.c" |
Jayasanker J | 4bca961 | 2020-07-06 15:34:30 +0530 | [diff] [blame] | 135 | "${AOM_ROOT}/av1/encoder/partition_search.h" |
| 136 | "${AOM_ROOT}/av1/encoder/partition_search.c" |
Paul Wilkins | be20bc2 | 2020-07-16 14:46:57 +0100 | [diff] [blame] | 137 | "${AOM_ROOT}/av1/encoder/pass2_strategy.h" |
bohanli | d165b19 | 2020-06-10 21:46:29 -0700 | [diff] [blame] | 138 | "${AOM_ROOT}/av1/encoder/pass2_strategy.c" |
Debargha Mukherjee | 2d565f4 | 2020-06-17 18:07:12 -0700 | [diff] [blame] | 139 | "${AOM_ROOT}/av1/encoder/pickcdef.h" |
chiyotsai | de1caf8 | 2020-06-09 14:59:22 -0700 | [diff] [blame] | 140 | "${AOM_ROOT}/av1/encoder/picklpf.h" |
Debargha Mukherjee | 82b2438 | 2020-06-16 23:30:39 -0700 | [diff] [blame] | 141 | "${AOM_ROOT}/av1/encoder/pickrst.h" |
Urvang Joshi | 7e91a69 | 2020-06-18 14:47:07 -0700 | [diff] [blame] | 142 | "${AOM_ROOT}/av1/encoder/ratectrl.c" |
Urvang Joshi | fee52c6 | 2020-06-17 13:45:55 -0700 | [diff] [blame] | 143 | "${AOM_ROOT}/av1/encoder/ratectrl.h" |
Paul Wilkins | c8d3f11 | 2020-07-08 17:58:14 +0100 | [diff] [blame] | 144 | "${AOM_ROOT}/av1/encoder/rc_utils.h" |
chiyotsai | de1caf8 | 2020-06-09 14:59:22 -0700 | [diff] [blame] | 145 | "${AOM_ROOT}/av1/encoder/rdopt.h" |
Hui Su | 60dd516 | 2020-06-10 16:56:14 -0700 | [diff] [blame] | 146 | "${AOM_ROOT}/av1/encoder/rdopt.c" |
Debargha Mukherjee | 2d565f4 | 2020-06-17 18:07:12 -0700 | [diff] [blame] | 147 | "${AOM_ROOT}/av1/encoder/speed_features.h" |
Jerome Jiang | 66e7624 | 2020-07-09 11:38:19 -0700 | [diff] [blame] | 148 | "${AOM_ROOT}/av1/encoder/svc_layercontext.c" |
| 149 | "${AOM_ROOT}/av1/encoder/svc_layercontext.h" |
Paul Wilkins | c84e8e2 | 2020-07-21 19:09:33 +0100 | [diff] [blame] | 150 | "${AOM_ROOT}/av1/encoder/temporal_filter.h" |
| 151 | "${AOM_ROOT}/av1/encoder/temporal_filter.c" |
Paul Wilkins | ff98f3e | 2020-07-27 16:01:05 +0100 | [diff] [blame] | 152 | "${AOM_ROOT}/av1/encoder/tpl_model.h" |
Marco Paniconi | 08f71f2 | 2020-07-14 10:41:47 -0700 | [diff] [blame] | 153 | "${AOM_ROOT}/av1/encoder/tx_search.h" |
Vishesh | a45092c | 2021-01-25 00:28:11 +0530 | [diff] [blame] | 154 | "${AOM_ROOT}/av1/encoder/txb_rdopt.h" |
Fyodor Kyslov | 3082401 | 2020-07-14 13:48:08 -0700 | [diff] [blame] | 155 | "${AOM_ROOT}/av1/encoder/var_based_part.h" |
Yunqing Wang | 3135d77 | 2022-03-17 23:31:04 -0700 | [diff] [blame] | 156 | "${AOM_ROOT}/av1/encoder/nonrd_opt.h" |
Fyodor Kyslov | 3082401 | 2020-07-14 13:48:08 -0700 | [diff] [blame] | 157 | "${AOM_ROOT}/av1/encoder/nonrd_pickmode.c") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 158 | endif() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 159 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 160 | if(CONFIG_AV1_DECODER AND CONFIG_AV1_ENCODER) |
| 161 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 162 | "${AOM_ROOT}/examples/aom_cx_set_ref.c") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 163 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 164 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 165 | "Set encoder reference frame.") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 166 | endif() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 167 | |
Yunqing Wang | b97cfae | 2018-05-11 14:19:05 -0700 | [diff] [blame] | 168 | if(CONFIG_AV1_ENCODER) |
| 169 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 170 | "${AOM_ROOT}/examples/lightfield_encoder.c") |
Yunqing Wang | b97cfae | 2018-05-11 14:19:05 -0700 | [diff] [blame] | 171 | |
| 172 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 173 | "Lightfield encoder example.") |
Yunqing Wang | b97cfae | 2018-05-11 14:19:05 -0700 | [diff] [blame] | 174 | endif() |
| 175 | |
| 176 | if(CONFIG_AV1_DECODER) |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 177 | set(AOM_DOXYGEN_EXAMPLE_SOURCES |
| 178 | ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Yunqing Wang | d417bb5 | 2018-06-03 14:13:38 -0700 | [diff] [blame] | 179 | "${AOM_ROOT}/examples/lightfield_tile_list_decoder.c") |
| 180 | |
| 181 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 182 | "Lightfield tile list decoder example.") |
Yunqing Wang | d417bb5 | 2018-06-03 14:13:38 -0700 | [diff] [blame] | 183 | endif() |
| 184 | |
| 185 | if(CONFIG_AV1_DECODER) |
| 186 | set(AOM_DOXYGEN_EXAMPLE_SOURCES ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 187 | "${AOM_ROOT}/examples/lightfield_decoder.c") |
Yunqing Wang | b97cfae | 2018-05-11 14:19:05 -0700 | [diff] [blame] | 188 | |
| 189 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 190 | "Lightfield decoder example.") |
Yunqing Wang | b97cfae | 2018-05-11 14:19:05 -0700 | [diff] [blame] | 191 | endif() |
| 192 | |
Yunqing Wang | 40bde4d | 2018-06-01 16:48:03 -0700 | [diff] [blame] | 193 | if(CONFIG_AV1_DECODER AND CONFIG_AV1_ENCODER) |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 194 | set(AOM_DOXYGEN_EXAMPLE_SOURCES |
| 195 | ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
Yunqing Wang | 40bde4d | 2018-06-01 16:48:03 -0700 | [diff] [blame] | 196 | "${AOM_ROOT}/examples/lightfield_bitstream_parsing.c") |
| 197 | |
| 198 | set(AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS} |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 199 | "Lightfield bitstream parsing example.") |
Yunqing Wang | 40bde4d | 2018-06-01 16:48:03 -0700 | [diff] [blame] | 200 | endif() |
| 201 | |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 202 | # Iterates over list named by $list_name and appends each item to $AOM_DOXYFILE |
| 203 | # as values assigned to $var_name with no line breaks between list items. |
| 204 | # Appends a new line after the entire config variable is expanded. |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 205 | function(write_cmake_list_to_doxygen_config_var var_name list_name) |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 206 | unset(output_string) |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 207 | foreach(list_item ${${list_name}}) |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 208 | set(output_string "${output_string} ${list_item} ") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 209 | endforeach() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 210 | string(STRIP "${output_string}" output_string) |
| 211 | file(APPEND "${AOM_DOXYFILE}" "${var_name} += ${output_string}\n") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 212 | endfunction() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 213 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 214 | function(get_name file_path name_var) |
| 215 | get_filename_component(file_basename ${file_path} NAME) |
| 216 | get_filename_component(${name_var} ${file_basename} NAME_WE) |
| 217 | set(${name_var} ${${name_var}} PARENT_SCOPE) |
| 218 | endfunction() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 219 | |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 220 | function(setup_documentation_targets) |
| 221 | |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 222 | # Sanity check: the lengths of these lists must match. |
| 223 | list(LENGTH AOM_DOXYGEN_EXAMPLE_SOURCES num_sources) |
| 224 | list(LENGTH AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS num_descs) |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 225 | if(NOT ${num_sources} EQUAL ${num_descs}) |
Wan-Teh Chang | b1c8367 | 2023-09-27 11:41:14 -0700 | [diff] [blame] | 226 | message(FATAL_ERROR "Unequal example and description totals.") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 227 | endif() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 228 | |
| 229 | # Take the list of examples and produce example_basename.dox for each file in |
| 230 | # the list. |
| 231 | file(MAKE_DIRECTORY "${AOM_DOXYGEN_OUTPUT_DIR}") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 232 | foreach(example_file ${AOM_DOXYGEN_EXAMPLE_SOURCES}) |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 233 | unset(example_basename) |
| 234 | get_name("${example_file}" "example_name") |
| 235 | set(example_dox "${AOM_DOXYGEN_OUTPUT_DIR}/${example_name}.dox") |
| 236 | set(dox_string "/*!\\page example_${example_name} ${example_name}\n") |
| 237 | set(dox_string "${dox_string} \\includelineno ${example_file}\n*/\n") |
| 238 | file(WRITE "${example_dox}" ${dox_string}) |
| 239 | set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} "${example_dox}") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 240 | endforeach() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 241 | |
| 242 | # Generate samples.dox, an index page that refers to the example_basename.dox |
| 243 | # files that were just created. |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 244 | set(samples_header " |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 245 | /*!\\page samples Sample Code |
| 246 | This SDK includes a number of sample applications. Each sample documents a |
| 247 | feature of the SDK in both prose and the associated C code. The following |
| 248 | samples are included: |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 249 | ") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 250 | |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 251 | set(utils_desc " |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 252 | In addition, the SDK contains a number of utilities. Since these utilities are |
| 253 | built upon the concepts described in the sample code listed above, they are not |
| 254 | documented in pieces like the samples are. Their source is included here for |
| 255 | reference. The following utilities are included: |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 256 | ") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 257 | |
| 258 | # Write the description for the samples section. |
| 259 | set(samples_dox "${AOM_CONFIG_DIR}/samples.dox") |
| 260 | file(WRITE "${samples_dox}" "${samples_header}\n") |
| 261 | |
| 262 | # Iterate over $AOM_DOXYGEN_EXAMPLE_SOURCES and |
| 263 | # $AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS and massage example names as required by |
| 264 | # AV1's doxygen setup. |
| 265 | math(EXPR max_example_index "${num_sources} - 1") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 266 | foreach(NUM RANGE ${max_example_index}) |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 267 | list(GET AOM_DOXYGEN_EXAMPLE_SOURCES ${NUM} ex_name) |
| 268 | get_name("${ex_name}" "ex_name") |
| 269 | |
| 270 | # AV1's doxygen lists aomdec and aomenc as utils apart from the examples. |
| 271 | # Save the indexes for another pass. |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 272 | if("${ex_name}" MATCHES "aomdec\|aomenc") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 273 | set(util_indexes "${util_indexes}" "${NUM}") |
| 274 | continue() |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 275 | endif() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 276 | list(GET AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${NUM} ex_desc) |
| 277 | file(APPEND "${samples_dox}" " - \\subpage example_${ex_name} ${ex_desc}\n") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 278 | endforeach() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 279 | |
| 280 | # Write the description and index for the utils. |
| 281 | file(APPEND "${samples_dox}" "${utils_desc}\n") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 282 | foreach(util_index ${util_indexes}) |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 283 | list(GET AOM_DOXYGEN_EXAMPLE_SOURCES ${util_index} ex_name) |
| 284 | get_name("${ex_name}" "ex_name") |
| 285 | list(GET AOM_DOXYGEN_EXAMPLE_DESCRIPTIONS ${util_index} ex_desc) |
| 286 | file(APPEND "${samples_dox}" " - \\subpage example_${ex_name} ${ex_desc}\n") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 287 | endforeach() |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 288 | file(APPEND "${samples_dox}" "*/") |
| 289 | |
| 290 | # Add $samples_dox to the doxygen inputs. |
| 291 | get_filename_component(samples_dox ${samples_dox} NAME) |
| 292 | set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} ${samples_dox}) |
| 293 | |
Yunqing Wang | 04caf8b | 2020-05-11 20:52:17 -0700 | [diff] [blame] | 294 | # There are issues to show Markdown file for old Doxygen version. Here, only |
| 295 | # enable Markdown support for 1.8.16 or newer. |
| 296 | if(${DOXYGEN_VERSION_VALUE} GREATER_EQUAL 1008016) |
| 297 | set(AOM_DOXYGEN_SECTIONS ${AOM_DOXYGEN_SECTIONS} "av1_md_support") |
| 298 | set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} "${AOM_ROOT}/README.md") |
Yunqing Wang | 393387f | 2020-06-11 15:11:08 -0700 | [diff] [blame] | 299 | # Uncomment and add AlgorithmDescription.md in result page when it is done. |
| 300 | # set(AOM_DOXYGEN_SOURCES ${AOM_DOXYGEN_SOURCES} |
| 301 | # "${AOM_ROOT}/doc/AlgorithmDescription.md") |
Yunqing Wang | 04caf8b | 2020-05-11 20:52:17 -0700 | [diff] [blame] | 302 | endif() |
| 303 | |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 304 | # Generate libaom's doxyfile. |
Tom Finegan | 746a785 | 2017-06-02 11:29:48 -0700 | [diff] [blame] | 305 | file(WRITE "${AOM_DOXYFILE}" "##\n## GENERATED FILE. DO NOT EDIT\n##\n") |
| 306 | file(READ "${AOM_ROOT}/${AOM_DOXYGEN_CONFIG_TEMPLATE}" doxygen_template_data) |
| 307 | file(APPEND "${AOM_DOXYFILE}" ${doxygen_template_data}) |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 308 | file(APPEND "${AOM_DOXYFILE}" |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 309 | "EXAMPLE_PATH += ${AOM_ROOT} ${AOM_ROOT}/examples\n") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 310 | file(APPEND "${AOM_DOXYFILE}" |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 311 | "INCLUDE_PATH += ${AOM_CONFIG_DIR} ${AOM_ROOT}\n") |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 312 | file(APPEND "${AOM_DOXYFILE}" |
Tom Finegan | 85aa64b | 2019-05-20 15:57:47 -0700 | [diff] [blame] | 313 | "STRIP_FROM_PATH += ${AOM_ROOT} ${AOM_CONFIG_DIR}\n") |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 314 | write_cmake_list_to_doxygen_config_var("INPUT" "AOM_DOXYGEN_SOURCES") |
| 315 | write_cmake_list_to_doxygen_config_var("ENABLED_SECTIONS" |
| 316 | "AOM_DOXYGEN_SECTIONS") |
| 317 | |
Yunqing Wang | 0fd2773 | 2020-05-04 14:48:28 -0700 | [diff] [blame] | 318 | # Add AOMedia logo. |
| 319 | set(aom_logo "aomedia_logo_200.png") |
| 320 | configure_file(${AOM_ROOT}/${aom_logo} ${AOM_CONFIG_DIR}/${aom_logo} COPYONLY) |
| 321 | file(APPEND "${AOM_DOXYFILE}" |
| 322 | "PROJECT_LOGO = ${AOM_CONFIG_DIR}/${aom_logo}\n") |
| 323 | |
Yunqing Wang | ed7d20c | 2020-05-08 11:46:37 -0700 | [diff] [blame] | 324 | # Only set HAVE_DOT to YES if dot tool is found. |
Yunqing Wang | c7c0f27 | 2020-05-08 14:15:09 -0700 | [diff] [blame] | 325 | if(DOXYGEN_DOT_FOUND) |
Yunqing Wang | ed7d20c | 2020-05-08 11:46:37 -0700 | [diff] [blame] | 326 | file(APPEND "${AOM_DOXYFILE}" "HAVE_DOT = YES\n") |
Yunqing Wang | 7747e10 | 2020-05-11 20:07:40 -0700 | [diff] [blame] | 327 | file(APPEND "${AOM_DOXYFILE}" "DOT_GRAPH_MAX_NODES = 10000\n") |
Yunqing Wang | ed7d20c | 2020-05-08 11:46:37 -0700 | [diff] [blame] | 328 | endif() |
| 329 | |
Yunqing Wang | c7c0f27 | 2020-05-08 14:15:09 -0700 | [diff] [blame] | 330 | # Add image path. |
Yunqing Wang | 41aa31a | 2020-05-11 15:29:31 -0700 | [diff] [blame] | 331 | file(APPEND "${AOM_DOXYFILE}" "IMAGE_PATH += ${AOM_ROOT}/doc/dev_guide\n") |
Yunqing Wang | c7c0f27 | 2020-05-08 14:15:09 -0700 | [diff] [blame] | 332 | |
chiyotsai | c2f3841 | 2020-06-10 16:07:21 -0700 | [diff] [blame] | 333 | # Allow banner style comments |
| 334 | file(APPEND "${AOM_DOXYFILE}" "JAVADOC_BANNER = YES") |
| 335 | |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 336 | # Add the doxygen generation rule. |
| 337 | add_custom_target(docs ALL |
| 338 | COMMAND "${DOXYGEN_EXECUTABLE}" "${AOM_DOXYFILE}" |
| 339 | DEPENDS "${AOM_DOXYFILE}" ${AOM_DOXYGEN_SOURCES} |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 340 | ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
| 341 | "${AOM_DOXYGEN_CONFIG_TEMPLATE}" |
Tom Finegan | 0d066ce | 2017-05-30 11:07:05 -0700 | [diff] [blame] | 342 | SOURCES "${AOM_DOXYFILE}" ${AOM_DOXYGEN_SOURCES} |
Johann | 589bae8 | 2018-04-27 10:57:44 -0700 | [diff] [blame] | 343 | ${AOM_DOXYGEN_EXAMPLE_SOURCES} |
| 344 | "${AOM_DOXYGEN_CONFIG_TEMPLATE}") |
| 345 | endfunction() |