From d4a970f6962dda28133290194832b726b566ddab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 7 Jul 2022 18:59:06 -0400 Subject: Switch to meson build system --- doc/c/meson.build | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/c/meson.build (limited to 'doc/c/meson.build') 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 +# 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 -- cgit v1.2.1