Fix issues with detecting Sphinx

develop
lethosor 2015-09-26 13:28:06 -04:00
parent 9c6611dfc3
commit 441afcced5
1 changed files with 23 additions and 22 deletions

@ -10,7 +10,7 @@ else(CMAKE_CONFIGURATION_TYPES)
endif (NOT CMAKE_BUILD_TYPE)
endif(CMAKE_CONFIGURATION_TYPES)
SET(BUILD_DOCS "True" CACHE STRING "Choose whether to build the documentation (requires python and Sphinx.")
SET(BUILD_DOCS ON CACHE BOOL "Choose whether to build the documentation (requires python and Sphinx).")
## some generic CMake magic
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
@ -194,10 +194,11 @@ endif()
add_subdirectory(scripts)
#find_package(Sphinx REQUIRED)
find_package(Sphinx)
if (BUILD_DOCS)
if (NOT SPHINX_FOUND)
message(SEND_ERROR "Sphinx not found but BUILD_DOCS enabled")
endif()
set(SPHINX_THEME "alabaster")
set(SPHINX_THEME_DIR)
set(SPHINX_BINARY_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/docs/_build")