diff --git a/cmake/modules/FindSphinx.cmake b/cmake/modules/FindSphinx.cmake index 528b107c0..a9ffb861a 100644 --- a/cmake/modules/FindSphinx.cmake +++ b/cmake/modules/FindSphinx.cmake @@ -17,10 +17,13 @@ if (SPHINX_EXECUTABLE) OUTPUT_VARIABLE SPHINX_VERSION_STRING OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) - if (SPHINX_VERSION_STRING) + if (SPHINX_VERSION_STRING MATCHES "^Sphinx") string(REPLACE "Sphinx (sphinx-build) " "" SPHINX_VERSION ${SPHINX_VERSION_STRING}) - message (STATUS "Sphinx version is ${SPHINX_VERSION}") + else () + # newer sphinx builds just say sphinx-build + string(REPLACE "sphinx-build " "" SPHINX_VERSION ${SPHINX_VERSION_STRING}) endif () + message (STATUS "Sphinx version is ${SPHINX_VERSION}") endif () mark_as_advanced (SPHINX_EXECUTABLE) diff --git a/src/python/python2/CMakeLists.txt b/src/python/python2/CMakeLists.txt index 41d18b2a8..5f254849e 100644 --- a/src/python/python2/CMakeLists.txt +++ b/src/python/python2/CMakeLists.txt @@ -18,9 +18,9 @@ target_include_directories(${SWIG_MODULE_python2-mraa_REAL_NAME} if (DOXYGEN_FOUND AND PYTHON2_EXECUTABLE) foreach (_file ${DOCCLASSES}) - add_dependencies (${SWIG_MODULE_python2-mraa_REAL_NAME} ${_file}class_doc_i) + add_dependencies (gen_python2-mraa_mraa2PYTHON_wrap ${_file}class_doc_i) endforeach () - add_dependencies (${SWIG_MODULE_python2-mraa_REAL_NAME} common_hpp_doc_i) + add_dependencies (gen_python2-mraa_mraa2PYTHON_wrap common_hpp_doc_i) endif () set_target_properties (${SWIG_MODULE_python2-mraa_REAL_NAME} PROPERTIES