Added OpenCV minimal versions (#19231)

This commit is contained in:
Ilya Lavrenov authored and GitHub committed 2023-08-17 16:45:01 +04:00
1 parent 3e0f529700
commit 75b48e9cdc
8 files changed
+21 -12

No files matched your search

@@ -16,8 +16,8 @@ add_library(${TARGET_NAME} STATIC ${HEADERS} ${SOURCES})
# Find OpenCV components if exist
find_package(OpenCV QUIET COMPONENTS core imgproc imgcodecs)
if(NOT OpenCV_FOUND)
message(WARNING "OPENCV is disabled or not found, ${TARGET_NAME} is built without OPENCV support")
if(NOT OpenCV_FOUND OR NOT OpenCV_VERSION VERSION_GREATER_EQUAL 3)
message(WARNING "OpenCV ver. 3.0+ is not found, ${TARGET_NAME} is built without OPENCV support")
else()
target_compile_definitions(${TARGET_NAME} PRIVATE USE_OPENCV)
endif()