cmake编译opencv开源项目报错问题
Recently, cmake encountered the following problems when compiling a C + + open source project configured with OpenCV environment:
CMake Warning at D:/opencv4/OpenCVConfig.cmake:176 (message):
Found OpenCV Windows Pack but it has no 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:13 (find_package)
CMake Error at CMakeLists.txt:13 (find_package):
Found package configuration file:
D:/opencv4/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
So I checked all the methods online, which are basically divided into two categories: one is to modify cmakeLis.txt document. The other is to change the OpenCV version or vs version. But They are not working for me. Finally, I accidentally found that x64 was not selected in configure, and x86 was selected by default. After x64 was selected, the compilation was successful.
https://blog.csdn.net/weixin_61023120/article/details/124738628