make KDE4_AUTOMOC compatible to qmake

Matthias Kretz kretz at kde.org
Wed Jun 6 18:57:23 CEST 2007


Hi,

today I learned that qmake apparently can work with #included moc files but 
only if they are of the form moc_<name>.cpp. But KDE4_AUTOMOC wants them as 
<name>.moc.

In order to make it easier to switch from qmake to cmake (and back) I suggest 
the attached patch.

There's one issue I don't understand yet: Why are the *.moc files (and with my 
patch the moc_*.cpp files) added to add_library/add_executable? If they're 
compiled twice, linking obviously fails. Is it necessary to add a dependency? 
I disabled it for KDE4_ADD_LIBRARY in order to be able to test it with 
libphonon, and I have not seen any problems yet while compiling kdelibs.

Please CC me as I'm not subscribed to this list.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KDE4Macros.patch
Type: text/x-diff
Size: 2062 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20070606/1fe08f07/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20070606/1fe08f07/attachment.pgp 


More information about the Kde-buildsystem mailing list