提交 af95395f 编写于 作者: T TolyaTalamanov

Fix ifdef condition

上级 6b53fe8f
......@@ -10,7 +10,7 @@
// (cv::gapi::ov::backend() is still there and is defined always)
#include "backends/ov/govbackend.hpp"
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#include "backends/ov/util.hpp"
#include "api/gbackend_priv.hpp" // FIXME: Make it part of Backend SDK!
......@@ -991,11 +991,11 @@ void cv::gimpl::ov::GOVExecutable::run(cv::gimpl::GIslandExecutable::IInput &in
}
}
#else // HAVE_INF_ENGINE
#else // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
cv::gapi::GBackend cv::gapi::ov::backend() {
// Still provide this symbol to avoid linking issues
util::throw_error(std::runtime_error("G-API has been compiled without OpenVINO support"));
}
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
......@@ -10,7 +10,7 @@
// Include anyway - cv::gapi::ov::backend() still needs to be defined
#include "opencv2/gapi/infer/ov.hpp"
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#include <openvino/openvino.hpp>
......@@ -62,5 +62,5 @@ public:
}}}
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#endif // OPENCV_GAPI_GOVBACKEND_HPP
......@@ -7,7 +7,7 @@
#ifndef OPENCV_GAPI_INFER_OV_UTIL_HPP
#define OPENCV_GAPI_INFER_OV_UTIL_HPP
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
// NOTE: This file is not included by default in infer/ov.hpp
// and won't be. infer/ov.hpp doesn't depend on OV headers itself.
......@@ -30,6 +30,6 @@ GAPI_EXPORTS int to_ocv(const ::ov::element::Type &type);
}}}}
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#endif // OPENCV_GAPI_INFER_OV_UTIL_HPP
......@@ -4,7 +4,7 @@
//
// Copyright (C) 2023 Intel Corporation
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#include "../test_precomp.hpp"
......@@ -537,4 +537,4 @@ TEST(TestAgeGenderOV, InferTensorWithPreproc) {
} // namespace opencv_test
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册