We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91dc0ce commit 7725514Copy full SHA for 7725514
CMakeLists.txt
@@ -41,12 +41,14 @@ endif()
41
42
# Looking for OpenVINO in the python distribution. It doesn't work for cross-compiling build
43
if(NOT CMAKE_CROSSCOMPILING)
44
- find_package(Python3 REQUIRED)
45
- execute_process(
46
- COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')"
47
- OUTPUT_VARIABLE OpenVINO_DIR_PY
48
- ERROR_QUIET
49
- )
+ find_package(Python3 QUIET COMPONENTS Interpreter)
+ if(Python3_Interpreter_FOUND)
+ execute_process(
+ COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')"
+ OUTPUT_VARIABLE OpenVINO_DIR_PY
+ ERROR_QUIET
50
+ )
51
+ endif()
52
endif()
53
54
# Find OpenVINODeveloperPackage first to compile with SDL flags
0 commit comments