[CMake] QT and CMake

Mike Jackson imikejackson at gmail.com
Tue Aug 1 12:31:44 EDT 2006


On Aug 1, 2006, at 11:31 AM, Mike Jackson wrote:

>
> On Aug 1, 2006, at 10:03 AM, William A. Hoffman wrote:
>
>> At 09:19 AM 8/1/2006, Mike Jackson wrote:
>>> Hello,
>>>   I am new to both CMake and QT and so far I like both. I have
>>> written some small CMake files for some of my projects and so far so
>>> good. Now I have a project that is based on QT and I would still  
>>> like
>>> to stick with CMake instead of using yet another Makefile generator.
>>>
>>>   If I use CMake to build my QT based app, do I still need to run
>>> qmake -MyProject.pro first to get the moc'ed headers and
>>> implementation files?
>>>  I guess I just need a short primer on using the two make systems
>>> together.
>>>
>>> I took a look at the VTK source where the QT files are to look at
>>> that CMakelists.txt but it didn't really answer my question.
>>
>> CMake can run moc.
>>
>> http://www.cmake.org/HTML/Documentation.html
>>
>> FindQt4 :
>>
>>   macro QT4_WRAP_CPP(outfiles inputfile ... )
>>   macro QT4_WRAP_UI(outfiles inputfile ... )
>>   macro QT4_ADD_RESOURCE(outfiles inputfile ... )
>>   macro QT4_AUTOMOC(inputfile ... )
>>   macro QT4_GENERATE_MOC(inputfile outputfile )
>>
>> http://qtnode.net/wiki/Qt_with_cmake
>>
>> -Bill
>>
>>
>>
> Ahh..
>    That little bit isn't on _any_ web page that I found through  
> google. I _did_ find lots of people asking the same question as me  
> though..
>
> So I made the changes and now things seem to be building ok. Just  
> some QT errors to deal with now..
>
> I tried to edit the wiki at "http://wiki.qtcentre.org/" but the  
> "create new account" seems to be broken. The Page "http:// 
> wiki.qtcentre.org/index.php?title=Compiling_Qt4_apps_with_CMake"  
> has an example cmake file that will NOT work because of the same  
> mistake.
>
> And I am not a member of the other website http://qtnode.net/wiki/ 
> Qt_with_cmake to edit that wiki either.
>
> Both of these need to be updated.
>
> Thanks for the help
>

I was granted access to http://qtnode.net/wiki/ 
Qt_with_cmake#cmake_for_Qt_4 and made a change. Hopefully this will  
help future developers trying to get this combination to work.


--------
Mike Jackson
imikejackson <at> gmail <dot> com





More information about the CMake mailing list