|
|
@ -95,19 +95,23 @@ if(PYTHON_EXECUTABLE) |
|
|
|
endif(NOT ANDROID AND NOT IOS) |
|
|
|
endif(NOT ANDROID AND NOT IOS) |
|
|
|
|
|
|
|
|
|
|
|
if(BUILD_DOCS) |
|
|
|
if(BUILD_DOCS) |
|
|
|
# look for Sphinx |
|
|
|
find_host_program(SPHINX_BUILD sphinx-build) |
|
|
|
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sphinx; print sphinx.__version__" |
|
|
|
if(SPHINX_BUILD) |
|
|
|
RESULT_VARIABLE SPHINX_PROCESS |
|
|
|
if(UNIX) |
|
|
|
OUTPUT_VARIABLE SPHINX_VERSION |
|
|
|
execute_process(COMMAND sh -c "${SPHINX_BUILD} -_ 2>&1 | sed -ne 1p" |
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE) |
|
|
|
RESULT_VARIABLE SPHINX_PROCESS |
|
|
|
|
|
|
|
OUTPUT_VARIABLE SPHINX_VERSION |
|
|
|
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE) |
|
|
|
if(SPHINX_PROCESS EQUAL 0) |
|
|
|
else() |
|
|
|
find_host_program(SPHINX_BUILD sphinx-build) |
|
|
|
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sphinx; print sphinx.__version__" |
|
|
|
if(SPHINX_BUILD) |
|
|
|
RESULT_VARIABLE SPHINX_PROCESS |
|
|
|
set(HAVE_SPHINX 1) |
|
|
|
OUTPUT_VARIABLE SPHINX_VERSION |
|
|
|
message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}") |
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
if(SPHINX_PROCESS EQUAL 0) |
|
|
|
|
|
|
|
set(HAVE_SPHINX 1) |
|
|
|
|
|
|
|
message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}") |
|
|
|
|
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endif(BUILD_DOCS) |
|
|
|
endif(BUILD_DOCS) |
|
|
|
endif(PYTHON_EXECUTABLE) |
|
|
|
endif(PYTHON_EXECUTABLE) |
|
|
|