[Kde-games-devel] The name of our library
Matt Williams
matt at milliams.com
Wed Apr 9 13:30:05 CEST 2008
On Wednesday 09 April 2008 05:28:07 Ian Wadham wrote:
> When I moved Kubrick to KDE Games and then went to update
> and re-build the module, all hell broke loose. For some reason,
> Kubrick got a whole page full of linker errors.
>
> After some anxious minutes poring over KStandardGameAction
> definitions and code and recent SVN changes to libkdegames,
> thinking that some KDE Games library definitions must have
> changed - actually it was more like an anxious hour - I finally
> realised the library is known as "kdegames" in the KDE Games
> module, but ${KDEGAMES_LIBRARY} in /playground and /kdereview.
>
> Isn't it time for our library to be given a standard CMake symbol -
> such as ${KDEGAMES_LIBRARY} - that is recognised throughout KDE?
>
> Cheers, Ian W.
The reason for this is that the games in playground use the
FindLibKDEGames.cmake file to locate the KDE games library (libkdegames.so).
This cmake file sets ${KDEGAMES_LIBRARY} to the full path of this library
and at the linker phase, cmake converts this into -l and -L flags. It was in
fact me who went through playground and changed the games to link against
${KDEGAMES_LIBRARY} since this allows playground to be used when kdegames has
been installed to a non-standard location.
However, while building the games within the kdegames module the
libkdegames.so library hasn't yet been installed and so cmake links the games
against the library in the build directory. In this case, cmake knows the
target of the library is called 'kdegames' and so when you do
target_link_libraries(gamename kdegames) it knows to link against the local
copy of the library.
It's really just an artifact of being part of the main module.
Regards,
Matt W
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080409/d4c99dae/attachment.pgp
More information about the kde-games-devel
mailing list