summaryrefslogtreecommitdiff
path: root/Documentation/meson.build
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2018-11-20 08:18:42 -0800
committerKieran Bingham <kieran.bingham@ideasonboard.com>2018-11-28 11:10:11 +0000
commitc60069241f5ebd7c3a024435171efc58f3d01522 (patch)
treefcab18f3daad55b71fddc5c7f61b24d28ec9672e /Documentation/meson.build
parentce1c86c10cba48a1acc9b7ee745efb383077711a (diff)
Documentation: Introduce sphinx documentation
Utilise sphinx-build to generate documentation in HTML form, and populate with some initial content. An initial conf.py is generated from sphinx-quickstart and answering initial questions. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'Documentation/meson.build')
-rw-r--r--Documentation/meson.build21
1 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/meson.build b/Documentation/meson.build
new file mode 100644
index 00000000..578c1cae
--- /dev/null
+++ b/Documentation/meson.build
@@ -0,0 +1,21 @@
+sphinx = find_program('sphinx-build-3', required: false)
+if not sphinx.found()
+ sphinx = find_program('sphinx-build', required: false)
+endif
+
+if sphinx.found()
+ docs_sources = [
+ 'conf.py',
+ 'contributing.rst',
+ 'index.rst',
+ ]
+
+ custom_target('documentation',
+ command: [sphinx, '-W', '-b', 'html', meson.current_source_dir(), '@OUTPUT@'],
+ input: docs_sources,
+ output: 'html',
+ build_by_default: true)
+
+ install_subdir(meson.current_build_dir() + '/html',
+ install_dir: 'share/doc/libcamera-@0@'.format(api_version))
+endif