summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-03-11 13:29:57 +0100
committerMichal Cmarada <mcmarada@cisco.com>2019-03-15 10:07:11 +0100
commita9aacd4d48c3a5887267366c2ef643e953975792 (patch)
treec90c7c41eb77f8679cbcd85d66e7dde0067570ab /modules
parentf8e326876496ddcdaaa2525596c30aad820b69f4 (diff)
add documentation generator
Enables generating of HTML documentation. It depends on sphinx generator. During configuration if sphinx is detected it will generate "docs" target for make. To build the documentation use "make docs", which will build the HTML documentation in build-root/html. Change-Id: Ia627f7d26c954a2341e13a54006955d21d162802 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/FindSphinx.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/FindSphinx.cmake b/modules/FindSphinx.cmake
new file mode 100644
index 0000000..cb68e51
--- /dev/null
+++ b/modules/FindSphinx.cmake
@@ -0,0 +1,21 @@
+find_program(SPHINX_EXECUTABLE NAMES sphinx-build
+ HINTS
+ $ENV{SPHINX_DIR}
+ PATH_SUFFIXES bin
+ DOC "Sphinx documentation generator"
+ )
+
+include(FindPackageHandleStandardArgs)
+
+if(NOT SPHINX_EXECUTABLE)
+ message(STATUS "Sphinx generator not found! Skipping setup for documentation generator.")
+ set(SPHINX_FOUND false)
+else()
+ find_package_handle_standard_args(Sphinx DEFAULT_MSG
+ SPHINX_EXECUTABLE
+ )
+
+ mark_as_advanced(SPHINX_EXECUTABLE)
+ set(SPHINX_FOUND true)
+endif()
+