[Orxonox-commit 573] r3106 - in branches/ggz/src: . orxonox/gamestates

adrfried at orxonox.net adrfried at orxonox.net
Thu May 28 17:18:42 CEST 2009


Author: adrfried
Date: 2009-05-28 17:18:42 +0200 (Thu, 28 May 2009)
New Revision: 3106

Modified:
   branches/ggz/src/CMakeLists.txt
   branches/ggz/src/SpecialConfig.h.in
   branches/ggz/src/orxonox/gamestates/GSClient.cc
   branches/ggz/src/orxonox/gamestates/GSClient.h
Log:
ggz build configuration bug fixed

Modified: branches/ggz/src/CMakeLists.txt
===================================================================
--- branches/ggz/src/CMakeLists.txt	2009-05-28 05:15:03 UTC (rev 3105)
+++ branches/ggz/src/CMakeLists.txt	2009-05-28 15:18:42 UTC (rev 3106)
@@ -31,10 +31,6 @@
 ADD_COMPILER_FLAGS("-DOIS_DYNAMIC_LIB")
 # Tolua binding speedup if required
 ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" Release MinSizeRel TOLUA_PARSER_RELEASE)
-# Enable GGZMode support if found
-IF(GGZMODE_FOUND)
-  ADD_COMPILER_FLAGS("-DHAS_GGZ")
-ENDIF()
 
 ################ OrxonoxConfig.h ################
 

Modified: branches/ggz/src/SpecialConfig.h.in
===================================================================
--- branches/ggz/src/SpecialConfig.h.in	2009-05-28 05:15:03 UTC (rev 3105)
+++ branches/ggz/src/SpecialConfig.h.in	2009-05-28 15:18:42 UTC (rev 3106)
@@ -58,6 +58,9 @@
 #define MACRO_QUOTEME_AUX(x) #x
 #define MACRO_QUOTEME(x) MACRO_QUOTEME_AUX(x)
 
+/* Macro for availability of the ggzmod library */
+#cmakedefine GGZMOD_FOUND
+
 /* Handle default ConfigValues */
 namespace orxonox
 {

Modified: branches/ggz/src/orxonox/gamestates/GSClient.cc
===================================================================
--- branches/ggz/src/orxonox/gamestates/GSClient.cc	2009-05-28 05:15:03 UTC (rev 3105)
+++ branches/ggz/src/orxonox/gamestates/GSClient.cc	2009-05-28 15:18:42 UTC (rev 3106)
@@ -34,6 +34,9 @@
 #include "core/CommandLine.h"
 #include "core/Core.h"
 #include "network/Client.h"
+#ifdef GGZMOD_FOUND
+#include "GGZClient.h"
+#endif /* GGZMOD_FOUND */
 
 namespace orxonox
 {
@@ -53,7 +56,7 @@
     {
         Core::setIsClient(true);
 
-#ifdef HAS_GGZ
+#ifdef GGZMOD_FOUND
         ggzClient = NULL;
         if (GGZClient::isActive()) {
             COUT(3) << "Initializing GGZ\n";
@@ -62,9 +65,9 @@
         else {
             COUT(3) << "Not using GGZ\n";
         }
-#else  /* HAS_GGZ */
+#else  /* GGZMOD_FOUND */
         COUT(3) << "GGZ support disabled\n";
-#endif /* HAS_GGZ */
+#endif /* GGZMOD_FOUND */
 
         this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));
 
@@ -82,12 +85,12 @@
 
         client_->closeConnection();
 
-#ifdef HAS_GGZ
+#ifdef GGZMOD_FOUND
         if (ggzClient)
         {
             delete ggzClient;
         }
-#endif /* HAS_GGZ */
+#endif /* GGZMOD_FOUND */
 
         // destroy client
         delete this->client_;

Modified: branches/ggz/src/orxonox/gamestates/GSClient.h
===================================================================
--- branches/ggz/src/orxonox/gamestates/GSClient.h	2009-05-28 05:15:03 UTC (rev 3105)
+++ branches/ggz/src/orxonox/gamestates/GSClient.h	2009-05-28 15:18:42 UTC (rev 3106)
@@ -29,33 +29,33 @@
 #ifndef _GSClient_H__
 #define _GSClient_H__
 
+#include "SpecialConfig.h"
 #include "OrxonoxPrereqs.h"
 #include "network/NetworkPrereqs.h"
 #include "GSLevel.h"
 #include "GSGraphics.h"
-#ifdef HAS_GGZ
-#include "GGZClient.h"
-#endif /* HAS_GGZ */
 
 namespace orxonox
 {
+#ifdef GGZMOD_FOUND
+    class _OrxonoxExport GGZClient;
+#endif /* GGZMOD_FOUND */
+
     class _OrxonoxExport GSClient : public GameState<GSGraphics>, public GSLevel
     {
     public:
         GSClient();
         ~GSClient();
 
-
     private:
         void enter();
         void leave();
         void ticked(const Clock& time);
 
         Client* client_;
-#ifdef HAS_GGZ
+#ifdef GGZMOD_FOUND
         GGZClient* ggzClient;
-#endif /* HAS_GGZ */
-
+#endif /* GGZMOD_FOUND */
     };
 }
 




More information about the Orxonox-commit mailing list