Check for Python_EXECUTABLE in pyxir.cmake to fix Vitis AI EP build (#8631)

Co-authored-by: Jorn Tuyls <jornt.tuyls@gmail.com>
This commit is contained in:
Jorn Tuyls 2021-08-24 17:39:50 +02:00 committed by GitHub
parent 4bfff45859
commit 9053e1522d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,8 +3,8 @@
set(PYXIR_SHARED_LIB libpyxir.so)
if(PYTHONINTERP_FOUND)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
if(Python_EXECUTABLE)
execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
"import pyxir as px; print(px.get_include_dir()); print(px.get_lib_dir());"
RESULT_VARIABLE __result
OUTPUT_VARIABLE __output
@ -17,7 +17,7 @@ if(PYTHONINTERP_FOUND)
list(GET __values 1 PYXIR_LIB_DIR)
endif()
else()
message(STATUS "To find Pyxir, Python interpretater is required to be found.")
message(STATUS "To find Pyxir, the Python Executable needs to be found.")
endif()
add_library(pyxir SHARED IMPORTED)