kde4_automoc change (need help)
Alexander Neundorf
neundorf at kde.org
Fri May 12 17:46:02 CEST 2006
Hi,
On Friday 12 May 2006 10:16, you wrote:
> On Friday 12 May 2006 00:25, Alexander Neundorf wrote:
> > On Wednesday 10 May 2006 15:00, David Faure wrote:
> > > I want to implement "Q_OBJECT in .cpp file and no .h file at all, and
> > > .cpp includes .moc" support in kde4_automoc, for unit tests. Would be
> > > much more convenient than having to write a .h file for each, and by
> > > having the "no header file" condition there we avoid grepping both .h
> > > and .cpp for Q_OBJECT in all cases, which might slow things down.
> >
> > How about using Qt4_WRAP_CPP() ?
> > Usage:
> >
> > set(mySrcs foo.cpp widget.cpp main.cpp)
> > qt4_wrap_cpp(mySrcs widget.cpp) # <- all files which have to be moc'ed.
>
> I don't understand the name of that function. What's different between
> qt4_automoc(foo.cpp) and qt4_wrap_cpp(foo.cpp)?
Different usage:
set(mySrcs foo.cpp widget.cpp mainwindow.cpp)
kde4_automoc(${mySrcs}) <- detect automatically where to run moc
kde4_add_executable(kfoo ${mySrcs} )
as opposed to:
set(mySrcs foo.cpp widget.cpp mainwindow.cpp)
qt4_wrap_cpp(mySrcs foo.h widget.h) <- list the files which need to be
moc'ed, no autodetection, moc_foo.cxx will be created and added to the list
mySrcs
kde4_add_executable(kfoo ${mySrcs} )
> > Hmm, strange.
> > I'll have a closer look later.
>
> Thanks.
Bye
Alex
--
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org - http://www.kde.org
alex AT neundorf.net - http://www.neundorf.net
More information about the Kde-buildsystem
mailing list