Other pb with cmake
Laurent Montel
montel at kde.org
Fri Mar 17 18:31:11 CET 2006
On Friday 17 March 2006 18:26, Alexander Neundorf wrote:
> On Friday 17 March 2006 18:17, Laurent Montel wrote:
> > On Friday 17 March 2006 17:28, Alexander Neundorf wrote:
>
> ...
>
> > > In order for the preprocessor to find build/lib/board.moc, build/lib/
> > > would have to be added to the include path, just as build/ is part of
> > > the include path.
> > > This would mean *both* directories would be in the include path and for
> > > both files, src/board.cpp and src/lib/board.cpp the include path would
> > > be the same, so for both source files the *same* board.moc would be
> > > found first, so both would include build/board.moc.
> > >
> > > So I think we really have to change the moc handling for these
> > > conflicting files, i.e. automoc for on of them, and "manual" moc for
> > > the others, like this:
> > >
> > > set_source_files_properties(src/lib/board.cpp ...more files
> > > PROPERTIES SKIP_AUTOMOC TRUE)
> > > qt4_wrap_cpp(MY_SRCS src/lib/board.h ...more files which need to be
> > > mocced)
> >
> > Where is the difference ?
> > we will generate .moc too.
> > we will link with src/lib/board.moc and src/board.moc
>
> But the command line has to include -Ibuild/ -Ibuild/lib/, and this for
> both files, and so the preprocessor will find the same board.moc for both
> source files.
>
> > So how your method will fix potential problem ?
>
> It will generate a src/board.moc (which will be included) and a
> src/lib/moc_board.cxx (which will be compiled as a separate file).
ok I understand.
Ok I will better.
Thanks for info.
> Bye
> Alex
More information about the Kde-buildsystem
mailing list