Documentation: Generate source code documentation using Doxygen

Extend the documentation build system to automatically generate
documentation from source code using Doxygen. This is currently separate
from the sphinx documentation, and should be integrated using the
breathe (and possibly exhale) extensions.

As the Documentation/meson.build file needs to reference the variables
holding the source files, move the Documentation directory to the end of
the subdirs() in the top-level meson.build.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2018-12-11 20:20:07 +02:00
parent 652b1c8679
commit 53c4d4c34f
4 changed files with 2480 additions and 5 deletions

2441
Documentation/Doxyfile.in Normal file

File diff suppressed because it is too large Load diff

View file

@ -35,12 +35,12 @@ Documentation
-------------
Project documentation is created using `Sphinx`_. Source level documentation
is currently planned to utilise Doxygen integration. Please use this in your
development.
uses `Doxygen`_. Please make sure to document all code during development.
Sphinx integration with Doxygen will be with either `Breathe`_ or `Exhale`_
depending upon which system works best
Sphinx integration with Doxygen is planned, likely using `Breathe`_ and
`Exhale`_.
.. _Sphinx: http://www.sphinx-doc.org
.. _Doxygen: http://www.doxygen.nl
.. _Breathe: https://breathe.readthedocs.io/en/latest/
.. _Exhale: https://exhale.readthedocs.io/en/latest/

View file

@ -1,5 +1,39 @@
doc_install_dir = join_paths(get_option('datadir'), 'doc', 'libcamera-@0@'.format(api_version))
#
# Doxygen
#
doxygen = find_program('doxygen', required: false)
if doxygen.found()
cdata = configuration_data()
cdata.set('VERSION', meson.project_version())
cdata.set('TOP_SRCDIR', meson.source_root())
cdata.set('TOP_BUILDDIR', meson.build_root())
doxyfile = configure_file(input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: cdata,
install: false)
custom_target('doxygen',
input: [
doxyfile,
libcamera_api,
libcamera_headers,
libcamera_sources,
],
output: 'api-html',
command: [doxygen, doxyfile],
install: true,
install_dir: doc_install_dir)
endif
#
# Sphinx
#
sphinx = find_program('sphinx-build-3', required: false)
if not sphinx.found()
sphinx = find_program('sphinx-build', required: false)

View file

@ -23,11 +23,11 @@ add_project_arguments(cpp_arguments, language: 'cpp')
libcamera_includes = include_directories('include')
subdir('Documentation')
subdir('include')
subdir('src')
subdir('test')
subdir('utils')
subdir('Documentation')
pkg_mod = import('pkgconfig')
pkg_mod.generate(libraries : libcamera,