$ {QT_LIBRARIES} in cmake [英] ${QT_LIBRARIES} in cmake
问题描述
$ {QT_LIBRARIES}似乎在我发送消息( $ {QT_LIBRARIES})时显示为,并且普遍怀疑其设置不正确。实际上,似乎没有任何属性由find_package(Qt4必需)正确设置。有任何想法吗?
${QT_LIBRARIES} seems to turn out as "" when I do message("${QT_LIBRARIES}") and have a general suspicion that it is no being set properly. In fact it doesnt seem as if any of the attributes are being set properly by find_package(Qt4 REQUIRED). Any ideas?
我也尝试过find_package(Qt4 4.6.2组件QtCore QtGui需要)
I have also tried find_package(Qt4 4.6.2 COMPONENTS QtCore QtGui REQUIRED )
知道它正在查找单个qt库(来自cmake-gui)。
and I know that it is finding the individual qt libraries (from cmake-gui).
预先感谢!
推荐答案
您必须指定所需的实际Qt库,例如:(从手册页中引用)
You have to specify the actual Qt libraries you need, like this: (quoted from the man page)
find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED )
这篇关于$ {QT_LIBRARIES} in cmake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!