From afd7429cbd08f7857e75ef7a141fba349076617a Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Sat, 3 Aug 2013 00:17:40 +0400 Subject: [PATCH 1/2] Update OpenCVDetectPython.cmake On my MacOS the output of the sphinx-build binary is the following: Error: Insufficient arguments. Sphinx v1.2b1 Usage: /usr/local/bin/sphinx-build [options] sourcedir outdir [filenames...] ... I have installed sphinx, but without this change HAVE_SPHINX==0 for me, so I can't build docs. --- cmake/OpenCVDetectPython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake index debaaec53b..81b65eb934 100644 --- a/cmake/OpenCVDetectPython.cmake +++ b/cmake/OpenCVDetectPython.cmake @@ -108,7 +108,7 @@ if(PYTHON_EXECUTABLE) OUTPUT_QUIET ERROR_VARIABLE SPHINX_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE) - if(SPHINX_OUTPUT MATCHES "^Sphinx v([0-9][^ \n]*)") + if(SPHINX_OUTPUT MATCHES ".*Sphinx v([0-9][^ \n]*)") set(SPHINX_VERSION "${CMAKE_MATCH_1}") set(HAVE_SPHINX 1) message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}") From b84b8db2774f8709f30553c2e882ce33fa2ad62f Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Tue, 6 Aug 2013 14:28:07 +0400 Subject: [PATCH 2/2] Removed useless .* --- cmake/OpenCVDetectPython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake index 81b65eb934..54ddac15d1 100644 --- a/cmake/OpenCVDetectPython.cmake +++ b/cmake/OpenCVDetectPython.cmake @@ -108,7 +108,7 @@ if(PYTHON_EXECUTABLE) OUTPUT_QUIET ERROR_VARIABLE SPHINX_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE) - if(SPHINX_OUTPUT MATCHES ".*Sphinx v([0-9][^ \n]*)") + if(SPHINX_OUTPUT MATCHES "Sphinx v([0-9][^ \n]*)") set(SPHINX_VERSION "${CMAKE_MATCH_1}") set(HAVE_SPHINX 1) message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}")