Trying to use CMake and OpenCV

asked 2016-03-05 18:37:58 -0500

davidbuckman gravatar image

I'm getting the following error when trying to cmake a directory that has a CMakeList.txt and a file.cpp :

CMake Error at CMakeLists.txt:3 (find_package): By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenCV", but CMake did not find one.

Could not find a package configuration file provided by "OpenCV" with any of the following names:

OpenCVConfig.cmake
opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set "OpenCV_DIR" to a directory containing one of the above files. If "OpenCV" provides a separate development package or SDK, be sure it has been installed.

Any ideas? I've been looking around online, but can't find any concrete answers. Thanks!

edit retag flag offensive close merge delete

Comments

I think your opencv path is not standard. Example in my install i have build opencv in opencv/build. Cmake cannot find opencv. in cmake gui I have got same error message and opencv is OpenCV_DIR-NOTFOUND

I have to set OPENCV_DIR to opencv/build

LBerger gravatar imageLBerger ( 2016-03-06 09:39:32 -0500 )edit