Commit ecdbc3a5 authored by Cédric Traizet's avatar Cédric Traizet

ENH: add OoenCV 4 flag cmake variable

parent 569686e4
......@@ -26,8 +26,15 @@ if("${OpenCV_VERSION}" VERSION_LESS "2.4.0")
"it may not be fully compatible with OTB")
endif()
if(OpenCV_VERSION_MAJOR EQUAL 3)
# OTB_OPENCV_3 is true for OpenCV 3 and 4
if(OpenCV_VERSION_MAJOR GREATER_EQUAL 3)
set(OTB_OPENCV_3 1)
else()
set(OTB_OPENCV_3 0)
endif()
if(OpenCV_VERSION_MAJOR EQUAL 4)
set(OTB_OPENCV_4 1)
else()
set(OTB_OPENCV_4 0)
endif()
......@@ -21,5 +21,6 @@
#define otb_opencv_api_h
#cmakedefine OTB_OPENCV_3
#cmakedefine OTB_OPENCV_4
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment