aboutsummaryrefslogtreecommitdiffstats
path: root/doc/c/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-07 18:59:06 -0400
committerDavid Robillard <d@drobilla.net>2022-07-17 18:13:53 -0400
commitd4a970f6962dda28133290194832b726b566ddab (patch)
treecfe9747042d55388705371a8ce95505ffb702470 /doc/c/meson.build
parent7f3a2651a3635232d94f7bf9ce23d6b575735732 (diff)
downloadlv2-d4a970f6962dda28133290194832b726b566ddab.tar.xz
Switch to meson build system
Diffstat (limited to 'doc/c/meson.build')
-rw-r--r--doc/c/meson.build41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/c/meson.build b/doc/c/meson.build
new file mode 100644
index 0000000..3ce7fdc
--- /dev/null
+++ b/doc/c/meson.build
@@ -0,0 +1,41 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: CC0-1.0 OR ISC
+
+lv2_source_doc = meson.current_source_dir()
+
+if doxygen.found()
+ reference_doxygen_in = files('reference.doxygen.in')
+
+ config = configuration_data(
+ {
+ 'LV2_SRCDIR': lv2_source_root,
+ 'LV2_BUILDDIR': lv2_build_root,
+ 'LV2_VERSION': meson.project_version(),
+ }
+ )
+
+ reference_doxygen = configure_file(
+ configuration: config,
+ input: reference_doxygen_in,
+ output: 'reference.doxygen',
+ )
+
+ docs = custom_target(
+ 'html',
+ command: [doxygen, '@INPUT@'],
+ input: reference_doxygen,
+ install: true,
+ install_dir: lv2_docdir,
+ output: ['html', 'tags'],
+ )
+
+ # TODO: doc_deps is needed because Meson did not support using custom target
+ # outputs as dependencies until 0.60.0. When 0.60.0 is required, this can be
+ # cleaned up by removing doc_deps and using lv2_tags (not its path) as a
+ # command argument, which Meson will correctly make a dependency for.
+
+ lv2_tags = docs[1]
+ doc_deps = [docs]
+else
+ doc_deps = []
+endif