Sphinx is not required for building any more

This commit is contained in:
Florian Hahn 2013-08-01 22:30:59 +02:00
parent 2b8bb6304e
commit 95e0eadd67

View File

@ -1,4 +1,7 @@
find_package(Sphinx REQUIRED)
# cmake should not fail if sphinx is missing
find_package(Sphinx)
if(SPHINX_EXECUTABLE)
if(NOT DEFINED SPHINX_THEME)
set(SPHINX_THEME default)
@ -29,3 +32,9 @@ add_custom_target(docs
"${CMAKE_CURRENT_SOURCE_DIR}"
"${SPHINX_HTML_DIR}"
COMMENT "Building HTML documentation with Sphinx")
else()
add_custom_target(docs
echo
"Please install python-sphinx to build the docs or read the docs online: https://projecttox.readthedocs.org/en/latest"
COMMENT "No sphinx executebale found")
endif()