Merge branch 'doc-singlehtml' into release

This commit is contained in:
Brad King 2014-04-25 08:43:07 -04:00
commit c2f27dadac
1 changed files with 13 additions and 1 deletions

View File

@ -24,6 +24,7 @@ project(CMakeHelp NONE)
option(SPHINX_MAN "Build man pages with Sphinx" OFF)
option(SPHINX_HTML "Build html help with Sphinx" OFF)
option(SPHINX_SINGLEHTML "Build html single page help with Sphinx" OFF)
option(SPHINX_TEXT "Build text help with Sphinx (not installed)" OFF)
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
@ -32,7 +33,7 @@ find_program(SPHINX_EXECUTABLE
mark_as_advanced(SPHINX_TEXT)
if(NOT SPHINX_MAN AND NOT SPHINX_HTML AND NOT SPHINX_TEXT)
if(NOT SPHINX_MAN AND NOT SPHINX_HTML AND NOT SPHINX_SINGLEHTML AND NOT SPHINX_TEXT)
return()
elseif(NOT SPHINX_EXECUTABLE)
message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!")
@ -60,6 +61,9 @@ endif()
if(SPHINX_MAN)
list(APPEND doc_formats man)
endif()
if(SPHINX_SINGLEHTML)
list(APPEND doc_formats singlehtml)
endif()
if(SPHINX_TEXT)
list(APPEND doc_formats text)
endif()
@ -122,3 +126,11 @@ if(SPHINX_HTML)
PATTERN objects.inv EXCLUDE
)
endif()
if(SPHINX_SINGLEHTML)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/singlehtml
DESTINATION ${CMAKE_DOC_DIR}
PATTERN .buildinfo EXCLUDE
PATTERN objects.inv EXCLUDE
)
endif()