[Qt-interest] How to write CMakeLists.txt when Q_OBJECT in xxx.cpp file

1+1=2 dbzhang800 at gmail.com
Sat Jul 31 13:33:02 CEST 2010


Tranks for your answer, but this does not work.

if i use qt4_automoc(xxx.cpp)

i will get

NMAKE : fatal error U1073: don't know how to make '..\xxx.h'
or
make[2]: *** No rule to make target `../xxx.h', needed by `xxx.moc'.  Stop.


Regards,
Debao
On Sat, Jul 31, 2010 at 6:22 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 31.07.10 16:58:38, 1+1=2 wrote:
>> Hi,everyone
>>
>> I am new to cmake. I don't know how to write a CMakeList.txt file if
>> Q_OBJECT in a  "xxx.cpp" source file.
>
> You usually do a #include "moc_xxx.cpp" and let the qt4_automoc macro
> handle the rest. Also this question would be better suited on the cmake
> list ;)
>
> Andreas
>
> --
> Accent on helpful side of your nature.  Drain the moat.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>




More information about the Qt-interest-old mailing list