From: vsr Date: Thu, 4 Mar 2021 08:22:48 +0000 (+0300) Subject: OpenCV 4 compatibility X-Git-Tag: V9_7_0a1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb1d54589a5a6a8a8b24dc4cf1087c46528489a5;p=tools%2Fconfiguration.git OpenCV 4 compatibility --- diff --git a/cmake/FindOpenCV.cmake b/cmake/FindOpenCV.cmake index c8317d0..7be670b 100644 --- a/cmake/FindOpenCV.cmake +++ b/cmake/FindOpenCV.cmake @@ -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) diff --git a/cmake/FindSalomeOpenCV.cmake b/cmake/FindSalomeOpenCV.cmake index 7ff08f1..a60b675 100644 --- a/cmake/FindSalomeOpenCV.cmake +++ b/cmake/FindSalomeOpenCV.cmake @@ -23,13 +23,8 @@ # # !! 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})