From 9053e1522dd23551411e2ff8f7d8c8084d1b6c4e Mon Sep 17 00:00:00 2001 From: Jorn Tuyls Date: Tue, 24 Aug 2021 17:39:50 +0200 Subject: [PATCH] Check for Python_EXECUTABLE in pyxir.cmake to fix Vitis AI EP build (#8631) Co-authored-by: Jorn Tuyls --- cmake/external/pyxir.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/external/pyxir.cmake b/cmake/external/pyxir.cmake index 03f462366f..98d6e8b209 100644 --- a/cmake/external/pyxir.cmake +++ b/cmake/external/pyxir.cmake @@ -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)