summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-24 18:59:34 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-24 19:23:27 (GMT)
commitfaf291a9c41cc2a4ffa6797c1d35c7863118a4c4 (patch)
treefb83772708b5c8269e394579c7e9d8f11e03b896
parent20b46a09e38be7521a903e1846716ce9a2ed2df6 (diff)
downloadCMake-faf291a9c41cc2a4ffa6797c1d35c7863118a4c4.zip
CMake-faf291a9c41cc2a4ffa6797c1d35c7863118a4c4.tar.gz
CMake-faf291a9c41cc2a4ffa6797c1d35c7863118a4c4.tar.bz2
Utilities/Sphinx: Add option to build 'singlehtml' format
Add SPHINX_SINGLEHTML to enable the Sphinx 'singlehtml' builder.
-rw-r--r--Utilities/Sphinx/CMakeLists.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index 23dc6ae..5e3e04b 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -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()