# Find OpenCV components if exist
find_package(OpenCV COMPONENTS imgcodecs videoio imgproc QUIET)
if(NOT OpenCV_FOUND)
- message(WARNING "OPENCV is disabled or not found, " ${TARGET_NAME} " is built without OPENCV support")
-else()
- add_definitions(-DUSE_OPENCV)
+ message(WARNING "OPENCV is disabled or not found, " ${TARGET_NAME} " is disabled")
+ return()
endif()
add_executable(${TARGET_NAME} ie_c_api_test.cpp test_model_repo.hpp)
# Find OpenCV components if exist
find_package(OpenCV COMPONENTS imgcodecs videoio imgproc QUIET)
if(NOT OpenCV_FOUND)
- message(ERROR "OPENCV is disabled or not found, " ${TARGET_NAME} " needs OpenCV for its build")
+ message(WARNING "OPENCV is disabled or not found, " ${TARGET_NAME} " needs OpenCV for its build")
else()
add_definitions(-DUSE_OPENCV)
endif()
#include "precision_utils.h"
#include "ie_precision.hpp"
+#ifdef USE_OPENCV
+
#include <opencv2/core.hpp>
using namespace InferenceEngine;
const auto value = std::numeric_limits<fromType>::max();
EXPECT_EQ(PrecisionUtils::saturate_cast<toType>(value), cv::saturate_cast<toType>(value));
}
+
+#endif // USE_OPENCV