CMake compilation error..(Unknown CMake command “QT4_WRAP_UI”)

痞子三分冷 提交于 2019-12-12 13:10:45

问题


im trying to build grass plugin for qgis ..

when i try to use cmake .. i get the following error after configuring..

CMake Error at CMakeLists.txt:78 (QT4_WRAP_UI):
   Unknown CMake command "QT4_WRAP_UI".

I have Qt4 ,PyQt and python2.6 installed already..

can anyone help me how to figure out whats wrong here?

Thanks.


回答1:


You need to import the Qt4 macros from CMake. A line like this should do it:

find_package(Qt4)



回答2:


In addition to just locating the package you should include ${QT_USE_FILE}, that is:

find_package(Qt4)
include(${QT_USE_FILE})


来源:https://stackoverflow.com/questions/637079/cmake-compilation-error-unknown-cmake-command-qt4-wrap-ui

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!