From ba1d86ec80d8fb1d0618e559d21aa5da720a5d6f Mon Sep 17 00:00:00 2001 From: Michael Herstine Date: Sun, 20 Feb 2022 10:42:39 -0800 Subject: [PATCH] Add (resurrect?) doxygen support. Added a `doxygen` option to the `doc` build. It makes use of the already-present but unused file `doxygen.conf.in`. --- doc/meson.build | 19 +++++++++++++++++++ meson_options.txt | 1 + 2 files changed, 20 insertions(+) diff --git a/doc/meson.build b/doc/meson.build index 24a586bb4..9f66e4383 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -36,3 +36,22 @@ if get_option('manpages') install_dir: [join_paths(get_option('mandir'), 'man1'), join_paths(get_option('mandir'), 'man5')], ) endif + +doxygen = find_program('doxygen', required: false) +if get_option('doxygen') and doxygen.found() + + conf_data = configuration_data() + conf_data.set('VERSION', meson.project_version()) + conf_data.set('abs_top_srcdir', meson.source_root()) + doxyfile = configure_file( + input: 'doxygen.conf.in', + output: 'Doxyfile', + configuration: conf_data + ) + + custom_target('Doxygen', + command: [doxygen, doxyfile], + output: ['api'], + build_by_default: true + ) +endif diff --git a/meson_options.txt b/meson_options.txt index 523821bf2..0bed82234 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,6 +1,7 @@ option('documentation', type: 'feature', description: 'Build documentation') option('html_manual', type: 'boolean', value: true, description: 'Build the HTML manual') option('manpages', type: 'boolean', value: true, description: 'Build manual pages') +option('doxygen', type: 'boolean', value: false, description: 'Build doxygen source documentation') option('syslog', type: 'feature', description: 'syslog support') option('inotify', type: 'boolean', value: true, description: 'inotify support (for automatic database update)')