Ask Your Question

thgis's profile - activity

2014-11-20 04:21:16 -0500 asked a question How is OpenCVConfig.cmake detectable by cmake on windows

Hi

I have downloaded opencv 3 source, build and installed both debug and release. (I'm using VS12 64 bit)

I now have an install folder with all the needed files. I added the absolute path of "..\install\x64\vc12\bin" to the environment path variable to be able to load the dll's (examples work so this is fine i believe)

Directly in the install folder I have two cmake files: OpenCVConfig.cmake OpenCVConfig-version.cmake

In the "install\x64\vc12\lib" folder there is also a number of cmake files: OpenCVConfig.cmake OpenCVModules.cmake OpenCVModules-debug.cmake OpenCVModules-release.cmake

So lots of cmake files. The question is: how is the .cmake files detectable in a CMakeLists.txt of another project so I'm able to write find_package(Opencv REQUIRE)? I would expect that I need to point to one of the two parent directories containing the cmake files.

Without having done anything other than adding the bin path to the environment path variable it seems that cmake is able to find the OpenCVConfig.cmake files, but I cant figure out how?

I can't find other environment variables that holds any information about opencv install paths.

2014-09-09 05:55:01 -0500 received badge  Supporter (source)