执行cmake移植opencv时出错,报错信息如下:
CMake Warning at cmake/OpenCVFindLibsGUI.cmake:18 (find_package): Could not
find module FindQt5Core.cmake or a configuration file for package Qt5Core.
其中文翻译是:
cmake / OpenCVFindLibsGUI.cmake上的CMake警告:18(find_package):
找不到模块FindQt5Core.cmake或包的配置文件 Qt5Core。
它给出的解决方法是把QT5中cmake的配置路径添加到QT5_Core_DIR中;
Adjust CMAKE_MODULE_PATH to find FindQt5Core.cmake or set Qt5Core_DIR to the
directory containing a CMake configuration file for Qt5Core. The file will have
one of the following names: Qt5CoreConfig.cmake qt5core-config.cmake
使用命令在QT路径下定位这两个文件,locate Qt5CoreConfig.cmake ,找到两个目录:

进入/opt/Qt5.3.2/5.3/android_armv7/lib/cmake/目录,QT5需要的配置路径都在这个下面;

依次将cmake中需要的路径都填上;
再次configure,就没有报错了,用generte生成Makefile;

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信