| 1 |
# Copyright (C) 2025 Rob Hall |
| 2 |
# SPDX-License-Identifier: MIT |
| 3 |
|
| 4 |
if not get_option('enable_docs') |
| 5 |
subdir_done() |
| 6 |
endif |
| 7 |
|
| 8 |
doxygen = find_program('doxygen', required: true) |
| 9 |
|
| 10 |
doxyfile_conf = configuration_data() |
| 11 |
doxyfile_conf.set('INPUT', f'@dvdread_src_root@/src/dvdread \\\n @dvdread_build_root@/src/dvdread') |
| 12 |
doxyfile_conf.set('PROJECT_NAME', 'libdvdread') |
| 13 |
doxyfile_conf.set('STRIP_FROM_PATH', f'@dvdread_src_root@/src \\\n @dvdread_build_root@/src') |
| 14 |
doxyfile_conf.set('OUTPUT_DIRECTORY', meson.current_build_dir()) |
| 15 |
doxyfile_conf.set('INPUT_DIRECTORY', meson.current_source_dir()) |
| 16 |
doxyfile_conf.set('PROJECT_VERSION', meson.project_version()) |
| 17 |
|
| 18 |
doxyfile = configure_file( |
| 19 |
input: 'doxygen.cfg.in', |
| 20 |
output: 'Doxyfile', |
| 21 |
configuration: doxyfile_conf, |
| 22 |
) |
| 23 |
|
| 24 |
custom_target('docs', |
| 25 |
depend_files: dvdread_api_headers, |
| 26 |
command: [doxygen, '-q', doxyfile], |
| 27 |
output: ['html'], |
| 28 |
install: true, |
| 29 |
install_dir: get_option('datadir') / 'doc/libdvdread', |
| 30 |
install_tag: 'doc', |
| 31 |
) |