2
votes

I am trying to build CI2CV on windows using cmake for the first time. I get below errors while building

"CMake Error at CMakeLists.txt:17 (find_package):Could not find a package configuration file provided by "OpenCV" with any of the following names:

OpenCVConfig.cmake
opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set "OpenCV_DIR" to a directory containing one of the above files. If "OpenCV" provides a separate development package or SDK, be sure it has been installed."

Tried to set CMAKE_PREFIX_PATH to location where OpenCVConfig.cmake file resides also tried the same with OpenCV_DIR. But no luck.

Please let me know way out of this.

2
have you solved this ? - Moha the almighty camel
No. Not yet. I am still getting this error. - Sandeep
can you edit your question to show what command are you typing on your cmd ? - Moha the almighty camel
Snap: cmake -DOpenCV_DIR:PATH=F:Sandeep\ CI2CV\opencv\build\x86\vc10\bin F:\Sandeep\CI2CV\face-analysis-sdk-stable\build CMake Error at CMakeLists.txt:17 (find_package): Could not find a package configuration file provided by "OpenCV" with any of the following names: OpenCVConfig.cmake opencv-config.cmake Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set "OpenCV_DIR" to a directory containing one of the above files. If "OpenCV" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! - Sandeep
did you try the GUI-cmake ? - Moha the almighty camel

2 Answers

0
votes

You need to create a variable OpenCV_DIR and set that to the location where OpenCVConfig.cmake is:

cmake -DOpenCV_DIR:PATH=C:/opencv ..
0
votes

Add to CMakeLists.txt:

set(OpenCV_DIR THE_PATH)