summaryrefslogtreecommitdiffstats
path: root/doc/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-17 17:33:37 -0400
committerDavid Robillard <d@drobilla.net>2022-07-18 20:10:45 -0400
commite2731cf7008b2f1f9e1f44283b07c3fe0296bbee (patch)
tree7e24b7005920af4d0e969000dc80e3fdffe3eb41 /doc/meson.build
parent1cda90c39e4b2c55c775cd6bd6dcb08aee4d640d (diff)
downloadsord-e2731cf7008b2f1f9e1f44283b07c3fe0296bbee.tar.gz
sord-e2731cf7008b2f1f9e1f44283b07c3fe0296bbee.tar.bz2
sord-e2731cf7008b2f1f9e1f44283b07c3fe0296bbee.zip
Switch to meson build system
Diffstat (limited to 'doc/meson.build')
-rw-r--r--doc/meson.build36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..a354f30
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,36 @@
+docdir = get_option('datadir') / 'doc'
+
+doxygen = find_program('doxygen', required: get_option('docs'))
+
+build_docs = doxygen.found()
+
+if build_docs
+ config = configuration_data()
+ config.set('SORD_VERSION', meson.project_version())
+ config.set('SORD_SRCDIR', sord_src_root)
+ config.set('DOX_OUTPUT', meson.current_build_dir())
+
+ c_doxyfile = configure_file(
+ configuration: config,
+ input: files('reference.doxygen.in'),
+ output: 'reference.doxygen',
+ )
+
+ custom_target(
+ 'html',
+ build_by_default: true,
+ command: [doxygen, '@INPUT0@'],
+ input: [c_doxyfile] + c_headers,
+ install: true,
+ install_dir: docdir / versioned_name,
+ output: 'html',
+ )
+endif
+
+if not get_option('docs').disabled()
+ install_man(files('sord_validate.1', 'sordi.1'))
+endif
+
+if not meson.is_subproject()
+ summary('API Documentation', build_docs, bool_yn: true)
+endif