如何解决Mac中的Qt5(找不到套件)cmake错误? [英] How to solve qt5 (packages not found) cmake errors in mac?
本文介绍了如何解决Mac中的Qt5(找不到套件)cmake错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在使用CMake构建文件时出现以下错误:
I get these following errors during build of a file using CMake:
CMake Warning at CMakeLists.txt:33 (FIND_PACKAGE):
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Core", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Core" with any of the following names:
Qt5CoreConfig.cmake
qt5core-config.cmake
有人知道如何解决这个问题吗?预先感谢
Anybody know how to solve this? Thanks in advance
推荐答案
您应该在以下位置的Qt安装中找到cmake软件包:
You should find the cmake packages in your Qt installation in:
<install_prefix>/lib/cmake
假定<install_prefix>
是安装的根路径.在您的配置中将变量Qt5_DIR设置为<install_prefix>/lib/cmake/Qt5
,并且cmake应该能够找到所有模块
Assuming <install_prefix>
is the root path of your installation. Set the variable Qt5_DIR to <install_prefix>/lib/cmake/Qt5
in your configuration and cmake should be able to find all the modules
这篇关于如何解决Mac中的Qt5(找不到套件)cmake错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文