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})