[cmake-developers] cmake automoc breaks kde
Stephen Kelly
steveire at gmail.com
Wed Nov 2 18:39:29 EDT 2011
On 11/02/2011 06:32 PM, David Faure wrote:
> On Monday 31 October 2011 21:47:31 Alexander Neundorf wrote:
> No, it's the other way around, in KDE. $ grep Q_OBJECT kautosavefile.*
> kautosavefile.h: Q_OBJECT $ grep moc kautosavefile.cpp #include
> "kautosavefile.moc"
>> If it did additionally other things, this was more or less accidentially.
> How does qmake handle such cases ?
> Checking....
> Indeed qmake expects moc_foo.cpp for the standard case (Q_OBJECT in header).
> This is why kde4automoc was made to support both moc filenames, so that it
> could be compatible with the kde way of doing it (foo.moc) and with the qmake
> way of doing it (moc_foo.cpp).
>
> Oh well, if you want to stick to that we'll change all of KDE, for the benefit
> of a clearer future indeed... At least it won't be an source incompatible
> change for app developers since they will have to enable CMAKE_AUTOMOC to get
> into this situation. Merely upgrading cmake or KDE (even to frameworks 5)
> won't trigger it. OK not exactly, find_package(kde4) will stop working so they
> will -have- to port to CMAKE_AUTOMOC, it will be the only solution
> available...
If cmake in master is already doing what qmake does wrt the names of
these files, and KDE wants the opposite, maybe we can make
set(CMAKE_AUTOMOC_KDE_HACK ON)
enable the opposite, and then we in KDE can actively port away from it
without needing it immediately.
Thanks,
Steve.
More information about the cmake-developers
mailing list