[Qt-interest] 'AutoMoc' as prebuild event in msvc2008
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Mon Dec 14 21:56:15 CET 2009
Why not just run qmake which does exactly the same thing?
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of j
Sent: Monday, December 14, 2009 12:49 PM
To: qt-interest at trolltech.com
Cc: Daniel Dekkers
Subject: [Qt-interest] 'AutoMoc' as prebuild event in msvc2008
Hi there,
In setting up my msvc2008 environment for use with Qt-4.6
I found it quite convenient to have an 'AutoMoc' python script
as a prebuild event. The script scans the $(projectDir) recursively
for .h files that contain 'Q_OBJECT' and then runs moc.exe on them,
generating a moc_filename.h in the same folder. the arguments to
moc can be provided as well, so you just need to add the call to
the python script as a prebuild event, add an #include "moc_filename.h"
to your corresponding .cpp file, and all should be well.
the script can be found here:
http://www.dynamica.org/PUB/AutoMoc/AutoMoc.htm
regards,
Jochem van der Spek
_______________________________________________
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