[Kde-games-devel] Where/how is $(LIB_KDEGAMES) defined?

Andreas Beckermann b_mann at gmx.de
Wed Jul 19 14:35:37 CEST 2006


On Wednesday 19 July 2006 08:20, Ian Wadham wrote:
> > That's why we can't easily use "-lkdegames" in kdegames and use the
> > LIB_KDEGAMES variable instead.
>
> So here's a suggestion from an old system architect from way back.
> Why not get $(LIB_KDEGAMES) defined (by default) as "-lkdegames"
> in all that KDE "admin" apparatus, or whatever the CMake equivalent
> will be.  That's what seems to happen with other KDE libraries.

No, it is not. See for example kdelibs/kdeui/Makefile.am:
libkdeui_la_LIBADD = ../kdecore/libkdecore.la
-> again you cannot use -lkdecore here, as that might use an already installed 
library, which would break kdelibs.

You can use "-lkdecore", "-lkdegames", "-lwhatever" if and only if you are in 
a different module than the library you link against. Because then you _want_ 
to link against an already installed library.

> You 
> could still re-define it to use a dev or test library in the "kdegames" dir
> and so could I (for final compilation and testing), but I much prefer to
> work with *stable* libraries every day.

Which is exactly what we do in kdegames: configure.in.in defines it to 
$(top_builddir)/libkdegames/libkdegames.la if it resides in kdegames, but it 
defines it to -lkdegames if it resides somewhere else.

So I don't see what you suggest here.

About cmake: It's probably easier here (well, most things seem to be easier 
with cmake :)). From looking at it, we use things like
  target_link_libraries(target_name kdegames)
and this will probably use the kdegames library target, if existing (i.e. if 
in the kdegames module) and the kdegames library if not. Which is again 
exactly what you need :)

btw: cmake works pretty well with kde3, too. Well, most of the time at 
least ;-)

> All the best, Ian W.

CU
Andi


More information about the kde-games-devel mailing list