[Kde-games-devel] Where/how is $(LIB_KDEGAMES) defined?
Ian Wadham
ianw at netspace.net.au
Thu Jul 20 03:27:55 CEST 2006
> On Wednesday 19 July 2006 08:20, Ian Wadham wrote:
> > 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.
>
From: "Andreas Beckermann" <b_mann at gmx.de>
> 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.
>
I beg to differ. I think the attached extract from "admin/acinclude.m4.in"
on the KDE 3.5 branch of SVN is what I am talking about. I think
$(LIB_KDEGAMES) could have been defined by default somewhere
in there and so would have been defined in tarballs, etc., but I guess it's
too late (ancient history) now.
> 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.
>
Which is almost all the time for me. I'm a library *user*, not a library
developer. I think we've been talking at cross-purposes on that. My
build (Makefile.am) refers to $(LIB_KIO) and $(LIB_KDEGAMES), so
people modifying libraries can build my app with their latest libraries.
The
$(LIB_KIO), when I am building, evaluates to "-lkio" and brings in various
KDE libraries in whatever (stable) KDE version I have installed, but the
$(LIB_KDEGAMES) evaluates to null (unless I play tricks with
"export" or "configure.in.in") and my build fails, with unreadable
messages about functions whose names I do not recognize.
> So I don't see what you suggest here.
>
I hope you do now.
> 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 :)
>
What excellent news! We used to achieve all that with environment
variables ("export") back in the bad old days. But I guess the world
is much more complicated now ... ;-)
> btw: cmake works pretty well with kde3, too.
>
Thanks, I'll give it a try. I need to learn about CMake and it would
help to start with a non-trivial example that I already know.
All the best, Ian W.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: acsubst.txt
Url: http://mail.kde.org/pipermail/kde-games-devel/attachments/20060720/f2168f51/attachment.txt
More information about the kde-games-devel
mailing list