]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
OpenCV 4 compatibility vsr/opencv_4
authorvsr <vsr@opencascade.com>
Thu, 4 Mar 2021 08:22:48 +0000 (11:22 +0300)
committervsr <vsr@opencascade.com>
Thu, 4 Mar 2021 08:22:48 +0000 (11:22 +0300)
cmake/FindOpenCV.cmake
cmake/FindSalomeOpenCV.cmake

index c8317d0b31fa9234431b589bce27a55901f65d00..7be670b4520fe34191b62b493e20a616a03b1e37 100644 (file)
@@ -29,12 +29,7 @@ IF(NOT OpenCV_FIND_QUIETLY)
   MESSAGE(STATUS "Check for OpenCV ...")
 ENDIF()
 
-FIND_PATH(OpenCV_INCLUDE_DIRS cv.h PATH_SUFFIXES opencv)
-IF(OpenCV_INCLUDE_DIRS)
-  SET(_OpenCV_INCLUDE_DIR_TMP "${OpenCV_INCLUDE_DIRS}/../opencv2")
-  GET_FILENAME_COMPONENT(_OpenCV_INCLUDE_DIR_TMP "${_OpenCV_INCLUDE_DIR_TMP}" REALPATH)
-  LIST(APPEND OpenCV_INCLUDE_DIRS ${_OpenCV_INCLUDE_DIR_TMP})
-ENDIF()
+FIND_PATH(OpenCV_INCLUDE_DIRS opencv2/core.hpp)
 
 SET(OpenCV_LIB_COMPONENTS videostab;video;ts;superres;stitching;photo;ocl;objdetect;ml;legacy;imgproc;highgui;gpu;flann;features2d;core;objdetect;imgcodecs;shape)
 
index 7ff08f1781e23e861f437198aa7c377f4825bb9c..a60b675c21745afab8a480124584a48a9df4ebcf 100644 (file)
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
-SET(UpCount 2)
 
-IF (WIN32)
-  SET(UpCount 0)
-ENDIF (WIN32)
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCV OpenCV_DIR ${UpCount})
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCV OpenCV_INCLUDE_DIRS 1)
 
 IF(OpenCV_FOUND) 
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCV_LIBRARIES})