diff options
Diffstat (limited to 'cmake/modules/FindSphinx.cmake')
-rw-r--r-- | cmake/modules/FindSphinx.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/modules/FindSphinx.cmake b/cmake/modules/FindSphinx.cmake new file mode 100644 index 0000000000..a2adcae732 --- /dev/null +++ b/cmake/modules/FindSphinx.cmake @@ -0,0 +1,25 @@ +# CMake find_package() Module for Sphinx documentation generator +# http://sphinx-doc.org/ +# +# Example usage: +# +# find_package(Sphinx) +# +# If successful the following variables will be defined +# SPHINX_FOUND +# SPHINX_EXECUTABLE + +find_program(SPHINX_EXECUTABLE + NAMES sphinx-build sphinx-build2 + DOC "Path to sphinx-build executable") + +# Handle REQUIRED and QUIET arguments +# this will also set SPHINX_FOUND to true if SPHINX_EXECUTABLE exists +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Sphinx + "Failed to locate sphinx-build executable" + SPHINX_EXECUTABLE) + +# Provide options for controlling different types of output +option(SPHINX_OUTPUT_HTML "Output standalone HTML files" ON) +option(SPHINX_OUTPUT_MAN "Output man pages" ON) |