[cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?

Alexander Neundorf neundorf at kde.org
Fri Jun 15 15:56:51 EDT 2012


Hi,

attached is a small patch which sets the OBJECT_DEPENDS  property of a moced 
file to the generated moc file.
This has the effect that before the cpp file is built, moc has been run on it.
We have that in KDE's version of qt4_generate_moc() this way since 2006 and it 
works for us.
In cmake's version, it was removed January 11th 2008, the removed call to 
MACRO_ADD_FILE_DEPENDENCIES():
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fbb541c4e7e4731de9bfbd483

Now since we are trying to get rid of our custom stuff in KDE, we hit that 
issue when trying to build parts of KDE with FindQt4.cmake from cmake.

Do you remember why this line was removed ?
What do you think about adding it again, as the attached patch does ?

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt4macros.diff
Type: text/x-patch
Size: 516 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120615/2f2215f3/attachment-0002.bin>


More information about the cmake-developers mailing list