[Kde-games-devel] Problems with standalone KDE Game build

Ian Wadham iandw.au at gmail.com
Sat Aug 25 02:39:57 UTC 2012


Hi guys,

For some time now I have been getting problems building a game
when its development source changes over to KGameRenderer.
The problems arise because the API of KGameRenderer has
changed completely between KDE 4.8 and KDE 4.9+ and my
standalone build picks up the KDE 4.8 includes from the KDE
4.8 installation I rely on for KDE Libs in general.

I have been thinking it was just a quirk of the Apple environment
in which I develop and have been working around the problem
by building all of KDE Games from scratch including the game
that is a new user of KGameRenderer.

However, on further investigation, it looks as though something
is wrong with the KDE Games standalone build.

My build environment is a fairly bog-standard kdesrc-build setup,
but I am not using kdesrc-build.  I get KDE 4.8.3 and Qt4-Mac 4.8
from Macports - and also KDE Games 4.8.3 (I like to play our games).

My base directory is /kdedev, with subdirectories /kdedev/kde4/*
for installation and testing, /kdedev/kdegames/* for SVN and my
development source code (trunk) and /kdedev/build/kdegames/*
for compilations and builds.  These directories and my KDE and
Qt libraries are pointed to by environment variables such as
$KDEDIR (see attached setup file).

PROBLEM 1)

The standalone build in every game's CMakeLists.txt says:

if(NOT COMPILING_KDEGAMES)
        find_package(KDE4 REQUIRED)
        include(KDE4Defaults)
        include(MacroLibrary)
        find_package(KDEGames REQUIRED)

        add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
        add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
        include_directories(${QDBUS_INCLUDE_DIRS} ${KDE4_INCLUDES} ${KDEGAMES_INCLUDE_DIRS})
endif(NOT COMPILING_KDEGAMES)

but it does not work for me.  If I include a message line to display whatever
${KDEGAMES_INCLUDE_DIRS} evaluates to, using:

message (STATUS "KDEGAMES_INCLUDE_DIRS = " ${KDEGAMES_INCLUDE_DIRS})

I get the output:

-- KDEGAMES_INCLUDE_DIRS = /kdedev/kde4/lib/cmake/KDEGames/../../../include/kdedev/kde4/lib/cmake/KDEGames/../../../include/KDE

The trunk versions of the KDE Games includes are actually installed at
$KDEDIR/include/KDE (the fancy form) and $KDEDIR/include (the vanilla
form), where $KDEDIR = /kdedev/kde4.  Rewriting the above:

-- KDEGAMES_INCLUDE_DIRS = $KDEDIR/lib/cmake/KDEGames/../../../include$KDEDIR/lib/cmake/KDEGames/../../../include/KDE

A cd to that directory fails and I guess it fails silently during the standalone
build procedure.  Somehow $KDEDIR has been put in there twice ...

PROBLEM 2)

If I hard-code  ${KDEGAMES_INCLUDE_DIRS} (via a CMake SET()) to be
$KDEDIR/include/KDE, everything works fine except for the following error:

In file included from /kdedev/kde4/include/KDE/KgThemeProvider:1:
/kdedev/kde4/include/KDE/../kgthemeprovider.h:24:10: fatal error: 'kgtheme.h' file
      not found
#include <kgtheme.h>

The build is recognizing the fancy form of #include < KgThemeProvider>, but is
not recognizing the vanilla form <kgtheme.h>.  Actually, both KgTheme and 
kgtheme.h are installed, in $KDEDIR/include/KDE and $KDEDIR/include.

Hoping these problems can be sorted,

Cheers, Ian W.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: my-setup
Type: application/octet-stream
Size: 2075 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20120825/72d738c9/attachment.obj>


More information about the kde-games-devel mailing list