• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# CMake find_package() Module for Sphinx documentation generator
2# http://sphinx-doc.org/
3#
4# Example usage:
5#
6# find_package(Sphinx)
7#
8# If successful the following variables will be defined
9# SPHINX_FOUND
10# SPHINX_EXECUTABLE
11
12find_program(SPHINX_EXECUTABLE
13             NAMES sphinx-build sphinx-build2
14             DOC "Path to sphinx-build executable")
15
16# Handle REQUIRED and QUIET arguments
17# this will also set SPHINX_FOUND to true if SPHINX_EXECUTABLE exists
18include(FindPackageHandleStandardArgs)
19find_package_handle_standard_args(Sphinx
20                                  "Failed to locate sphinx-build executable"
21                                  SPHINX_EXECUTABLE)
22
23# Provide options for controlling different types of output
24option(SPHINX_OUTPUT_HTML "Output standalone HTML files" ON)
25option(SPHINX_OUTPUT_MAN "Output man pages" ON)
26
27option(SPHINX_WARNINGS_AS_ERRORS "When building documentation treat warnings as errors" ON)
28