On Monday 09 March 2009, Alexander Neundorf wrote: > On Friday 06 March 2009, Brad King wrote: > > David Faure wrote: > > > On Friday 06 March 2009, Brad King wrote: > > >> If every Qt project needs something like this, wouldn't it make more > > >> sense for Qt itself to provide an executables with the capabilities of > > >> kde4automoc? > > > > > > Why would Qt do that? They still use and provide QMake (which includes > > > this functionality), they don't have much interest in cmake, > > > unfortunately... > > > > So qmake does it if you specify your build in their format, but provides no > > API to get the information otherwise? (FYI, I've never done any Qt > > development.)
I don't understand that question. qmake is a build-system tool like cmake, it doesn't provide any api at all, that's not its goal (and cmake shouldn't need qmake imho, that would be wrong layering). > > > On the other hand, cmake provides a FindQt4.cmake and QT_WRAP_CPP, > > > but it looks like a half solution. It only handles one case (separate > > > .moc for a .h), not the other 3 cases: > > > C2 - separate moc file for a .cpp, > > > C3 - #included moc file for a .h, and > > > C4 - #included moc file for a .cpp. > > > > This sounds like another great candidate for an issue tracker feature > > request if there isn't one already. > > automocing in general, while convinient, is kind of ugly. That's not what the request would be about. automoc4 is the best solution for automatic-moc'ing, we agree on that. If pure-cmake doesn't have automoc4, however, then IMHO what is needed is macros that handle all 4 cases. Otherwise porting existing source code to cmake is a problem (in my case it was an experiment to convince a customer to switch to cmake, so we tried to minimize the number of changes to the source files themselves, which never look good for a buildsystem that is supposed to be able to compile anything compileable ;-) As I said, qt4_generate_moc() can almost do that, but one has to be a bit careful about how it's called (full path to binary dir), and then one has to either include the moc in the list of sources or call macro_add_file_dependencies().... IMHO this calls for a small wrapper that makes things easier. But yeah, there are so many different ways to do this, that automoc4 is really easier, even if slightly slower... -- David Faure, [email protected], sponsored by Qt Software @ Nokia to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org). _______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
