KDE/kdelibs/cmake/modules

David Faure faure at kde.org
Thu Feb 16 01:25:57 CET 2006


On Wednesday 15 February 2006 19:07, Alexander Neundorf wrote:
> On Wednesday 15 February 2006 12:46, David Faure wrote:
> > SVN commit 509646 by dfaure:
> >
> > Reverting - generating moc files in subdirs worked, but this broke
> > compilation because the subdir (in the builddir) is missing from the -I.
> > How could we add it?
> 
> These are the remnants of the convenience libraries...
> 
> include_directories( ${CMAKE_BINARY_DIR}/<thesubdir> )
> 
> Did you have problems with this ?

Thanks, but still no go.

Because the gcc command line says -Ibuild/kabc -Ibuild/kabc/kab,
the #include "addressbook.moc" from kab/addressbook.cc still picks up the moc
file in build/kabc.

-I${CURRENT_BINARY_DIR} should be first but I don't know how to make that
happen. Editing include_directories() doesn't help, since that stuff is appended to
a lot of other stuff that comes before automatically (somehow...).

Hmm, is the include_directories of CMakeLists.txt in parent directories propagated to
its subdirs? It looks like it (in which case we can clean up a lot of include_directories
statements) - but in which case there's no way to do what I'm looking for.

Of course we could just throw the towel and rename kabc/kab/addressbook.cc to
something else, but the problem might reappear later elsewhere...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list