Linux Flavor: Debian (Crunch Bang)
Problem Occurred: When attempting to build cvblobs with the following command
cd ~/cvblob
cmake .
Error:
CMake Error at cvBlob/CMakeLists.txt:20 (find_package):
Found package configuration file:
/usr/local/share/OpenCV/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
-- Configuring incomplete, errors occurred!
Well I met a similar problem when I was going with some other open source face detection modules rather than cvblobs. Actually you will find that before these lines of error-info, there are:
So you may notice that it asks you to manually point out the directory of you build version of OpenCV library. For me, my source codes are at
but I make and install my release build of OpenCV at
so I use:
cmake -D OpenCV_DIR=/usr/local/opencv-2.4.13/release/ ..
and everything works:)When I compile a program that use OpenCV lib, vision 2.4.8, occurs the similar error, when I point manually Opencv_DIR path to opencv/build ,visio 3.1.0, error occurred like you.
Then I point
Opencv_DIR
path toopencv/build
whose vision is same to the program used. It works.One of the reason could be the another OpenCV package in another path, that you had installed before. In my case, I had already installed OpenCV for Python in
Anaconda
package, and the CMake always wanted to refer me to that package.I simply added:
to my
CMakeList.txt
file, this command simply override the other package you may had installed. The final version of CMakeList file which is working for me would be this:Note:
1- I am using the
CMakeList.txt
file for Clion IDE2- I am using it under windows. Probably you may set the relevant path if you use other OS
3- You need also change the OpenCV version if you use other version