From: Jake Chacko Date: Sat, 29 Nov 2025 22:19:12 +0000 (-0600) Subject: meson: add meson option for running doxygen in build X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d160e2a5a71f3ba7426c68271810e1e697ff4a8;p=thirdparty%2Flxc.git meson: add meson option for running doxygen in build Co-developed-by: Jake Chacko Co-developed-by: Rahik Sikder Signed-off-by: Jake Chacko --- diff --git a/doc/meson.build b/doc/meson.build index 2932314d9..79d52fecc 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -72,3 +72,16 @@ if want_mans install_dir: join_paths(mandir, 'man' + page[1])) endforeach endif + +# API Docs (Doxygen) +if want_api_docs + doxygen = find_program('doxygen', required: true) + + api_docs = custom_target( + 'api-docs', + input: files('api/Doxyfile'), + output: 'api-docs.stamp', + command: [doxygen, '@INPUT@'], + build_by_default: true + ) +endif \ No newline at end of file diff --git a/meson.build b/meson.build index 4b3a8f07f..40973279e 100644 --- a/meson.build +++ b/meson.build @@ -133,6 +133,7 @@ want_install_init = get_option('install-init-files') want_io_uring = get_option('io-uring-event-loop') want_pam_cgroup = get_option('pam-cgroup') want_mans = get_option('man') +want_api_docs = get_option('api-docs') want_tests = get_option('tests') want_tools = get_option('tools') want_tools_multicall = get_option('tools-multicall') @@ -341,6 +342,12 @@ if not sgml2man.found() endif endif +## API Docs. +doxygen = find_program('doxygen', required: false) +if not doxygen.found() and want_api_docs + error('missing required doxygen dependency') +endif + ## Threads. threads = dependency('threads') liblxc_dependencies += threads diff --git a/meson_options.txt b/meson_options.txt index f00e7406d..f93ab1f60 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -31,6 +31,10 @@ option('io-uring-event-loop', type: 'boolean', value: false, option('man', type: 'boolean', value: true, description: 'build and install manpages') +# was --{disable,enable}-api-docs in autotools +option('api-docs', type: 'boolean', value: false, + description: 'build and install API documentation (Doxygen)') + # was --{disable,enable}-pam in autotools option('pam-cgroup', type: 'boolean', value: false, description: 'build and install the pam cgroup module')