CMake compilation error .. (Unknown CMake command "QT4_WRAP_UI")

im trying to create a plugin for qgis ..

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

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

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

Can someone help me figure out what is wrong here?

Thanks.

+3
source share
2 answers

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

find_package(Qt4)
+4
source

In addition to simply placing the package, you must include $ {QT_USE_FILE}, that is:

find_package(Qt4)
include(${QT_USE_FILE})
+1
source

Source: https://habr.com/ru/post/1704622/


All Articles