Suraksha Ajith Suraksha Ajith - 11 days ago 12
C++ Question

CMake error while building MultiTarget-tracker library

I'm trying to build Multitarget-tracker using CMake in windows. Initially I had this warning below:

You should manually point CMake variable OpenCV_DIR to your build of OpenCV library.
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)


I manually pointed out the directory of build version of OpenCV library and tried to build. I referred this link while building. I now get this warning:

CMake Warning at CMakeLists.txt:23 (FIND_PACKAGE):
Found package configuration file:
C:/OpenCV/opencv/build/x86/vc12/lib/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND.


I tried to check the
OpenCV_FOUND
variable, but after I press 'configure' again, it automatically unchecks.

Answer

You're not supposed to check OpenCV_FOUND manually: it's a variable set by OpenCVConfig.cmake to tell CMake if OpenCV was found or not.

The fact it was set to FALSE is the sign your installation of OpenCV is not valid according to the package. Installing OpenCV properly is the solution.