Utilities/Sphinx: Add option to build 'text' format
Add SPHINX_TEXT to enable the Sphinx 'text' builder. Mark it as advanced and do not add install rules. This is intended for use by the release manager to build the release notes in text format suitable for email.
This commit is contained in:
parent
3611d77b6d
commit
34ea1f1520
|
@ -24,12 +24,15 @@ project(CMakeHelp NONE)
|
|||
|
||||
option(SPHINX_MAN "Build man pages with Sphinx" OFF)
|
||||
option(SPHINX_HTML "Build html help with Sphinx" OFF)
|
||||
option(SPHINX_TEXT "Build text help with Sphinx (not installed)" OFF)
|
||||
find_program(SPHINX_EXECUTABLE
|
||||
NAMES sphinx-build
|
||||
DOC "Sphinx Documentation Builder (sphinx-doc.org)"
|
||||
)
|
||||
|
||||
if(NOT SPHINX_MAN AND NOT SPHINX_HTML)
|
||||
mark_as_advanced(SPHINX_TEXT)
|
||||
|
||||
if(NOT SPHINX_MAN AND NOT SPHINX_HTML AND NOT SPHINX_TEXT)
|
||||
return()
|
||||
elseif(NOT SPHINX_EXECUTABLE)
|
||||
message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!")
|
||||
|
@ -57,6 +60,9 @@ endif()
|
|||
if(SPHINX_MAN)
|
||||
list(APPEND doc_formats man)
|
||||
endif()
|
||||
if(SPHINX_TEXT)
|
||||
list(APPEND doc_formats text)
|
||||
endif()
|
||||
|
||||
set(doc_format_outputs "")
|
||||
set(doc_format_last "")
|
||||
|
|
Loading…
Reference in New Issue