mirror of
https://github.com/opencv/opencv.git
synced 2024-12-18 11:28:02 +08:00
Moved Sphinx detection outside of the PYTHONINTERP_FOUND block.
Who knows, maybe the user's Sphinx installation uses a Python we couldn't find.
This commit is contained in:
parent
67ae438dae
commit
055a581977
@ -74,19 +74,19 @@ if(PYTHONINTERP_FOUND)
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
endif()
|
endif()
|
||||||
endif(NOT ANDROID AND NOT IOS)
|
endif(NOT ANDROID AND NOT IOS)
|
||||||
|
|
||||||
if(BUILD_DOCS)
|
|
||||||
find_host_program(SPHINX_BUILD sphinx-build)
|
|
||||||
if(SPHINX_BUILD)
|
|
||||||
execute_process(COMMAND "${SPHINX_BUILD}"
|
|
||||||
OUTPUT_QUIET
|
|
||||||
ERROR_VARIABLE SPHINX_OUTPUT
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
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}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif(BUILD_DOCS)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_DOCS)
|
||||||
|
find_host_program(SPHINX_BUILD sphinx-build)
|
||||||
|
if(SPHINX_BUILD)
|
||||||
|
execute_process(COMMAND "${SPHINX_BUILD}"
|
||||||
|
OUTPUT_QUIET
|
||||||
|
ERROR_VARIABLE SPHINX_OUTPUT
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
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}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif(BUILD_DOCS)
|
||||||
|
Loading…
Reference in New Issue
Block a user