本文介绍了CMake标志指向错误的Qt版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
即使我在顶部有 FIND_PACKAGE(Qt4 4.8.2必需)
,诸如QT_QTGUI_LIBRARY和QT_USE_FILE之类的标志也将路径返回到旧版本的Qt。
如何解决此问题?
解决方案
删除构建目录中的CMakeCache.txt并再次生成。有时有必要更新CMakeCache.txt,尤其是在升级项目中使用的某些支持库时。
Flags like QT_QTGUI_LIBRARY and QT_USE_FILE are returning the paths to an older version of Qt, even though I have FIND_PACKAGE(Qt4 4.8.2 REQUIRED)
at the top.
How do I go about fixing this?
解决方案
Delete CMakeCache.txt in your build directory and generate again. Sometimes it's necessary to update CMakeCache.txt especially if you upgrade some sided library used by you in your project.
这篇关于CMake标志指向错误的Qt版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!