opencv: Error compiling OpenCV - CMake
I just moved to using 3.0 version of OpenCV. This error seems to follow me. I have treid cleaning the project, moving to 3.1, but I cant seem to figure out what I’m missing:
$ cmake .
-- OpenCV ARCH:
-- OpenCV RUNTIME:
-- OpenCV STATIC: ON
CMake Warning at /Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:10 (find_package)
CMake Error at CMakeLists.txt:10 (find_package):
Found package configuration file:
/Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
-- Configuring incomplete, errors occurred!
Any tips on tackling this will help. I am building OpenCV on OSX El Capitan. I am not sure if this is a problem with cmake or opencv. Envorinment variables seem to be correct. Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 31 (7 by maintainers)
I solved the problem by changing the directory:
From: “C:/opencv/opencv320/build” To: “C:/opencv/opencv320/build/x64/vc14/lib”
Aka this lines:
From: SET(“OpenCV_DIR” “C:/opencv/opencv320/build”) To: SET(“OpenCV_DIR” “C:/opencv/opencv320/build/x64/vc14/lib”)
It was to compile the fDSST Tracker
from opencv/build/ copy OpencvConfig.cmake and OpenCVModules.cmake to opencv/cmake/ then in you project delete file build and run again cmake … and make
In your CMakeLists.txt file, insert the code
set(OpenCV_DIR <your opencv path>)
it worked for me@vikrantvm @alalek HI, I also have the same problem like you. I think that you have your problem because you find the OpenCVConfig.cmake file in this path
Actually, you should
cmake -DOpenCV_DIR=/Applications/opencv-3.1.0/build/OpenCVConfig.cmake
So, you will find the OpenCVConfig.cmake file in the …/build path not the …/cmake path.But my problem is even I
cmake -DOpenCV_DIR=/Applications/opencv-3.1.0/build
, it has error blow.CMake Error at CMakeLists.txt:4(FIND_PACKAGE):
Found package configuration file:
/home/dear/opencv-3.0.0/build/OpenCVConfig.cmake(this is the build path in my ubuntu 14.04 computer)
but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be NOT FOUND.
Thank U so much.