Skip to content

Commit 4164a10

Browse files
committed
solve for 'find_package(OpenVINO REQUIRED)' error during onnxruntime compile
1 parent 4852d1b commit 4164a10

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

onnxruntime/cppbuild.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ esac
7575
case $PLATFORM in
7676
linux-x86_64|macosx-arm64|windows-x86_64)
7777
export OPENVINO_CMAKE_DIR="$TOP_PATH/openvino/cppbuild/$PLATFORM/runtime/cmake"
78+
if [[ ! -f "$OPENVINO_CMAKE_DIR/OpenVINOConfig.cmake" ]]; then
79+
(cd "$TOP_PATH" && bash cppbuild.sh install openvino -platform "$PLATFORM")
80+
fi
81+
if [[ ! -f "$OPENVINO_CMAKE_DIR/OpenVINOConfig.cmake" ]]; then
82+
echo "Error: OpenVINOConfig.cmake not found in $OPENVINO_CMAKE_DIR"
83+
exit 1
84+
fi
7885
export OPENVINO_FLAGS="--use_openvino CPU --cmake_extra_defines OpenVINO_DIR=$OPENVINO_CMAKE_DIR"
7986
;;
8087
esac

0 commit comments

Comments
 (0)