Merge pull request #1266 from davidgyu/dev_cmake_find_python

Updated doc build to use FindPython
This commit is contained in:
David G Yu 2022-09-12 17:11:20 -07:00 committed by GitHub
commit b7a1d874be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,10 +54,10 @@ else()
endif()
find_package(PythonInterp 2.6)
find_package(Python COMPONENTS Interpreter)
# ReST - HTML documentation
if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
if (DOCUTILS_FOUND AND Python_Interpreter_FOUND)
set(HTML_FILES
search.html
@ -209,7 +209,7 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
OUTPUT
"${rstfile}"
COMMAND
"${PYTHON_EXECUTABLE}"
"${Python_EXECUTABLE}"
ARGS
"${CMAKE_CURRENT_SOURCE_DIR}/processTutorials.py"
"${infile}"
@ -302,7 +302,7 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
# build search index and insert navigation tab
add_custom_target(search_index
COMMAND
"${PYTHON_EXECUTABLE}"
"${Python_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/processHtml.py"
"${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/nav_template.txt"