1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2019, Olivier MATZ <zer0@droids-corp.org>
4 doc_install_dir = join_paths('share', 'doc', 'libecoli')
6 doxygen = find_program('doxygen', required : false)
8 error('MESON_SKIP_TEST doxygen not found.')
11 cdata = configuration_data()
12 cdata.set('VERSION', meson.project_version())
13 cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
14 cdata.set('TOPDIR', meson.source_root())
16 doxygen_conf = configure_file(
22 doxygen_build = custom_target(
26 command: [doxygen, '@INPUT@', '@OUTPUT@'],
27 build_by_default: true,
28 install_dir: doc_install_dir)
30 sphinx_build = find_program(
31 'sphinx-build', required: get_option('build_doc'))
32 if get_option('build_doc') and sphinx_build.found()
33 html_doc = custom_target('html_doc',
34 input: meson.current_source_dir(),
36 command: [sphinx_build, '@INPUT@', '@OUTPUT@'],
37 install: get_option('build_doc'),
38 install_dir: doc_install_dir)