Merge topic 'doc-singlehtml'

aaa6c8a6 Merge branch 'master' into doc-singlehtml
faf291a9 Utilities/Sphinx: Add option to build 'singlehtml' format
This commit is contained in:
Brad King 2014-04-29 09:58:48 -04:00 committed by CMake Topic Stage
commit 3681cc437d
1 changed files with 14 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_QTHELP "Build Qt help with Sphinx" OFF)
option(SPHINX_TEXT "Build text help with Sphinx (not installed)" OFF)
find_program(SPHINX_EXECUTABLE
@ -33,7 +34,7 @@ find_program(SPHINX_EXECUTABLE
mark_as_advanced(SPHINX_TEXT)
if(NOT SPHINX_MAN AND NOT SPHINX_HTML AND NOT SPHINX_QTHELP AND NOT SPHINX_TEXT)
if(NOT SPHINX_MAN AND NOT SPHINX_HTML AND NOT SPHINX_SINGLEHTML AND NOT SPHINX_QTHELP AND NOT SPHINX_TEXT)
return()
elseif(NOT SPHINX_EXECUTABLE)
message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!")
@ -61,6 +62,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()
@ -148,6 +152,15 @@ 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()
if(SPHINX_QTHELP)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake-${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}${CMake_VERSION_PATCH}.qch
DESTINATION ${CMAKE_DOC_DIR}