[CMake] QT and CMake

William A. Hoffman billlist at nycap.rr.com
Tue Aug 1 11:10:14 EDT 2006


At 10:59 AM 8/1/2006, Mike Jackson wrote:

>I came across that web site a little bit ago.. the problem that I am  
>having is the QT4_WRAP_UI is NOT generating a file...

You might have started at that point....  :) 


>Here is the relevant part of my CMakeLists.txt file:
>
>
>SET(qtproject_UIS
>    ImageImporter.ui
>)
>
>QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS})
>
>Which is pretty much from the web site. There is a note right  
>underneath this section that says using this macro will NOT generate  
>the file and I should use something else...
>
>This is all on cmake 2.4.3 and OS X 10.4.7


You have to make sure that all generated sources .h or .cpp are in the
source list of some target or it will not work.

See this FAQ:
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F

So make sure ${qtproject_UIS_H} is added to the sources of some target (exe or library).


-Bill



More information about the CMake mailing list