Suraksha Ajith Suraksha Ajith - 1 year ago 108
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:
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND.

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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download