Ask Your Question
0

cmake OpenCV_DIR

asked 2013-04-22 02:25:38 -0600

mrgloom gravatar image

Using this cmake file and pre-build version of opencv I get this error.

I need to set OpenCV_DIR?

CMake Warning at /OpenCV-2.4.3/cmake/OpenCVConfig.cmake:153 (message): Found OpenCV 2.4.3 Windows Super Pack but it has not 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:4 (find_package)

CMake Error at CMakeLists.txt:4 (find_package): Found package configuration file:

/OpenCV-2.4.3/cmake/OpenCVConfig.cmake

but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-22 05:29:10 -0600

Daniil Osokin gravatar image

updated 2013-04-23 01:13:33 -0600

You should set the OpenCV enviroment variable and add it to the systems path, as described in installation tutorial. Also, you can manually set this variable to OpenCV build folder in CMake.

edit flag offensive delete link more

Comments

I use pre-build version, so I just unzip it.

mrgloom gravatar imagemrgloom ( 2013-04-22 07:05:19 -0600 )edit

Did you try it on Windows?

Daniil Osokin gravatar imageDaniil Osokin ( 2013-04-22 08:36:04 -0600 )edit

yes, I use Windows.

mrgloom gravatar imagemrgloom ( 2013-04-23 00:45:48 -0600 )edit

I used windows and I already have opencv compiled but I am getting the exact same error. ANy help anyone?

RIddlemirror gravatar imageRIddlemirror ( 2013-08-14 04:55:48 -0600 )edit

@RIddlemirror Do you try to set env var? Also, you can pass to cmake: -DOpenCV_DIR=<full path to your OpenCV location>.

Daniil Osokin gravatar imageDaniil Osokin ( 2013-08-14 07:15:07 -0600 )edit

Yes, the env variable are set. How do I pass that to cmake?

RIddlemirror gravatar imageRIddlemirror ( 2013-08-14 08:49:49 -0600 )edit

You can specify it in the gui or pass in cmd, e.g. cmake.exe -DOpenCV_DIR=<...> -DOpenCV_FOUND=true <other cmake options>. BTW, does the error message point to the folder you specify in the env var?

Daniil Osokin gravatar imageDaniil Osokin ( 2013-08-14 12:05:20 -0600 )edit
2

I'm having the same problem as the OP and I have set the windows OPENCV_DIR env exactly as described in the opencv installation instructions. If I manually set the OpenCV_DIR CMake variable in the windows cmake gui and try to configure, it reverts the value I set to point to C:/Program Files (x86)/opencv/cmake, which is incorrect. I believe there's an issue with the way the current windows distributable handles CMake. I would think there would be a FindOpenCV.cmake somewhere in the distribution but there doesn't seem to be a working version...

ehfz gravatar imageehfz ( 2013-10-23 14:35:11 -0600 )edit

If Windows Super Pack has no binaries compatible with your configuration, you should build OpenCV manually and point OpenCV_DIR to build folder.

Daniil Osokin gravatar imageDaniil Osokin ( 2013-10-24 02:03:03 -0600 )edit

I have followed the same instructions. In cmd line, and also in "System properties>environment variables" with the correct value I have set OPENCV_DIR="mydir". But when I run CMake to configure my project, library directory is pointing to another location. Is there any way to fix this? is this Windows problem? I'm using win7 32b

TSL_ gravatar imageTSL_ ( 2014-09-25 19:48:36 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-22 02:25:38 -0600

Seen: 44,994 times

Last updated: Apr 23 '13