From 54f12f9fc0221354a5c8d808abd0503b57e777ed Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Sun, 28 Jul 2013 11:49:28 +0200 Subject: [PATCH] doc: fix the MathJax option - if Mathjax is detected, use it by default, it not do not use it by default but allow the user to provide the path. --- doc/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index c220511c..a8f54e08 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -3,17 +3,21 @@ find_package(MathJax) if (MATHJAX_PATH) message(STATUS "Detected MathJax at ${MATHJAX_PATH}") + option(Sphinx_Math_Generator_MathJax " " ON) else() message(STATUS "MathJax not found automatically") option(Sphinx_Math_Generator_MathJax " " OFF) - if (Sphinx_Math_Generator_MathJax) - set(SPHINX_MATH_GENERATOR "mathjax") - set(MATHJAX_PATH "MathJax" CACHE STRING "Path to the MathJax directory") - else (Sphinx_Math_Generator_MathJax) - set(SPHINX_MATH_GENERATOR "pngmath") - endif (Sphinx_Math_Generator_MathJax) + set(MATHJAX_PATH "MathJax" CACHE STRING "Path to the MathJax directory") endif() +if (Sphinx_Math_Generator_MathJax) + set(SPHINX_MATH_GENERATOR "mathjax") + message(STATUS "Using MathJax") +else (Sphinx_Math_Generator_MathJax) + set(SPHINX_MATH_GENERATOR "pngmath") + message(STATUS "Not using MathJax") +endif (Sphinx_Math_Generator_MathJax) + # the local extensions.... file(COPY ../foreignlibs/breathe ../foreignlibs/doxylink ../foreignlibs/mpl ../foreignlibs/autocompile DESTINATION ${CMAKE_CURRENT_BINARY_DIR})