]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
meson: add meson option for running doxygen in build 4615/head
authorJake Chacko <chackoj1204@gmail.com>
Sat, 29 Nov 2025 22:19:12 +0000 (16:19 -0600)
committerJake Chacko <chackoj1204@gmail.com>
Tue, 2 Dec 2025 03:51:44 +0000 (21:51 -0600)
Co-developed-by: Jake Chacko <chackoj1204@gmail.com>
Co-developed-by: Rahik Sikder <sikder.rahik@gmail.com>
Signed-off-by: Jake Chacko <chackoj1204@gmail.com>
doc/meson.build
meson.build
meson_options.txt

index 2932314d9fdbd3ed6747ea3a51a3e250a511c430..79d52fecc25558acd2139d3eb03f0e27567a7613 100644 (file)
@@ -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
index 4b3a8f07f14bb71f5119a59bfed785441629bdb1..40973279e79525ed7f8389352137101499652883 100644 (file)
@@ -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
index f00e7406dac33cfca20a99f0a007557bb3ac1725..f93ab1f6078211b82f5ecdda936dfb5175db1cd3 100644 (file)
@@ -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')