我在使用 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
有人知道怎么解决吗?提前致谢
最佳答案
您应该在您的 Qt 安装中找到 cmake 包:
<install_prefix>/lib/cmake
假设<install_prefix>
是安装的根路径。将变量 Qt5_DIR 设置为 <install_prefix>/lib/cmake/Qt5
在您的配置中,cmake 应该能够找到所有模块
关于c++ - 如何解决 mac 中的 qt5(未找到软件包)cmake 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38746635/