Howto fix KDE4 Buildsystem with CMake CVS

Andreas Pakulat apaku at gmx.de
Tue Feb 5 23:46:55 CET 2008


On 05.02.08 23:41:43, Alexander Neundorf wrote:
> On Tuesday 29 January 2008, Andreas Pakulat wrote:
> > On 29.01.08 18:11:48, David Faure wrote:
> > > On Monday 28 January 2008, Andreas Pakulat wrote:
> > > > On 28.01.08 10:32:15, Andreas Pakulat wrote:
> > > > > There are a couple of ways to fix this:
> > > > >
> > > > > a) introduce KDE_XXX_LIBRARY_DIR (or KDE_LIBRARY_DIR) and add
> > > > > link_directories calls for kde libdir and qt libdir in all
> > > > > CMakeLists.txt all over trunk/.
> > > >
> > > > I must be blind. FindKDE4Internal.cmake already advertises
> > > > KDE4_LIB_DIR, so this is simply a matter of fixing the projects that
> > > > need to use link_directories( ${KDE4_LIB_DIR} ).
> > >
> > > Can't we just do that in kde4_add_executable and kde4_add_library etc.?
> > > Or is that too much hidden magic?
> >
> > Its a "global" setting, like include_directories. IMHO we could just put
> > it into FindKDE4Internal, after all there's no point in finding KDE and
> > then not link to it...
> 
> No, we shouldn't add LINK_DIRECTORIES() somewhere global. We would do it only 
> for KDE4_LIB_DIR, but the same breakage can happen with just any other 
> library in any other dir.

So you want to add that to the top level CMakeLists.txt in each module?
(I've got patches at hand for what I have of trunk/) I'm using the
top-level CMakeLists.txt as thats also the place where most if not all
modules put the INCLUDE_DIRECTORIES(${KDE4_INCLUDE_DIR}) call.

> Maybe we need to put that compatibility switch into KDE4Defaults.cmake or 
> something like this.

But isn't that global as well, i.e. inside a CMake module that gets
automatically loaded when you do find_package(KDE4)? At least thats what
I meant with "global", put it into one of the files that get read as
soon as you search for KDE4.

Andreas

-- 
You have literary talent that you should take pains to develop.


More information about the Kde-buildsystem mailing list