Revision: 6506
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6506&view=rev
Author:   gbiggs
Date:     2008-06-09 23:35:48 -0700 (Mon, 09 Jun 2008)

Log Message:
-----------
Fixed config.h, playerconfig.h and their little friends.

Modified Paths:
--------------
    code/player/trunk/client_libs/libplayerc/playerc.h
    code/player/trunk/client_libs/libplayerc++/CMakeLists.txt
    code/player/trunk/client_libs/libplayerc++/debug.h
    code/player/trunk/client_libs/libplayerc++/playerc++.h
    code/player/trunk/client_libs/libplayerc++/playerclient.h
    code/player/trunk/client_libs/libplayerc++/test/CMakeLists.txt

Added Paths:
-----------
    code/player/trunk/client_libs/libplayerc++/playerc++config.h.in

Modified: code/player/trunk/client_libs/libplayerc/playerc.h
===================================================================
--- code/player/trunk/client_libs/libplayerc/playerc.h  2008-06-10 06:35:33 UTC 
(rev 6505)
+++ code/player/trunk/client_libs/libplayerc/playerc.h  2008-06-10 06:35:48 UTC 
(rev 6506)
@@ -54,6 +54,8 @@
 #include <netinet/in.h> // need this for struct sockaddr_in
 #include <stdio.h>
 
+#include <playerconfig.h>
+
 #ifdef HAVE_GEOS
 #ifndef GEOS_VERSION_MAJOR
 #include <geos_c.h>
@@ -62,10 +64,9 @@
 typedef void * GEOSGeom;
 #endif
 
-
 // Get the message structures from Player
+#include <libplayercore/playercommon.h>
 #include <libplayercore/player.h>
-#include <libplayercore/playercommon.h>
 #include <libplayercore/error.h>
 #include <libplayercore/interface_util.h>
 #include <libplayerxdr/playerxdr.h>
@@ -465,8 +466,8 @@
 
   /** How many messages were lost on the server due to overflows, incremented 
by player, cleared by user. */
   uint32_t overflow_count;
-  
-  
+
+
   /** @internal Socket descriptor */
   int sock;
 
@@ -481,7 +482,7 @@
    * received any data in this round? */
   int data_received;
 
-  
+
   /** List of available (but not necessarily subscribed) devices.
       This list is filled in by playerc_client_get_devlist(). */
   playerc_device_info_t devinfos[PLAYER_MAX_DEVICES];
@@ -1208,7 +1209,7 @@
 {
   /** Device info; must be at the start of all device structures. */
   playerc_device_t info;
-  
+
   uint32_t enabled;
   double duty_cycle;
   double period;
@@ -1229,18 +1230,18 @@
 int playerc_blinkenlight_unsubscribe(playerc_blinkenlight_t *device);
 
 /** Enable/disable power to the blinkenlight device. */
-int playerc_blinkenlight_enable( playerc_blinkenlight_t *device, 
+int playerc_blinkenlight_enable( playerc_blinkenlight_t *device,
                                 uint32_t enable );
 
 /** Set the output color for the blinkenlight device. */
-int playerc_blinkenlight_color( playerc_blinkenlight_t *device, 
+int playerc_blinkenlight_color( playerc_blinkenlight_t *device,
                                uint32_t id,
                                uint8_t red,
                                uint8_t green,
                                uint8_t blue );
 /** Make the light blink, setting the period in seconds and the
     mark/space ratiom (0.0 to 1.0). */
-int playerc_blinkenlight_blink( playerc_blinkenlight_t *device, 
+int playerc_blinkenlight_blink( playerc_blinkenlight_t *device,
                                uint32_t id,
                                float period,
                                float duty_cycle );
@@ -1687,12 +1688,12 @@
 int playerc_graphics3d_clear(playerc_graphics3d_t *device );
 
 /** @brief Translate the drawing coordinate system in 3d */
-int playerc_graphics3d_translate(playerc_graphics3d_t *device, 
+int playerc_graphics3d_translate(playerc_graphics3d_t *device,
                                 double x, double y, double z );
 
 
 /** @brief Rotate the drawing coordinate system by [a] radians about the 
vector described by [x,y,z] */
-int playerc_graphics3d_rotate( playerc_graphics3d_t *device, 
+int playerc_graphics3d_rotate( playerc_graphics3d_t *device,
                               double a, double x, double y, double z );
 /** @} */
 
@@ -2410,11 +2411,11 @@
 /** @brief Send a generic command */
 int playerc_opaque_cmd(playerc_opaque_t *device, player_opaque_data_t *data);
 
-/** @brief Send a generic request 
- * 
+/** @brief Send a generic request
+ *
  * If a non null value is passed for reply memory for the response will be 
allocated
  * and its pointer stored in reply. The caller is responsible for freeing this 
memory
- * 
+ *
  * If an error is returned no memory will have been allocated*/
 int playerc_opaque_req(playerc_opaque_t *device, player_opaque_data_t 
*request, player_opaque_data_t **reply);
 

Modified: code/player/trunk/client_libs/libplayerc++/CMakeLists.txt
===================================================================
--- code/player/trunk/client_libs/libplayerc++/CMakeLists.txt   2008-06-10 
06:35:33 UTC (rev 6505)
+++ code/player/trunk/client_libs/libplayerc++/CMakeLists.txt   2008-06-10 
06:35:48 UTC (rev 6506)
@@ -3,7 +3,6 @@
 OPTION (BUILD_PLAYERCC "Build the C++ client library" ON)
 OPTION (BUILD_PLAYERCC_BOOST "Include Boost support in the C++ client library" 
ON)
 IF (BUILD_PLAYERCC)
-    SET (PLAYERCC_DEFINITIONS "" CACHE INTERNAL "" FORCE)   # Clear this out 
to prevent unnecessary duplication and rebuilding
     # Look for Boost libraries
     SET (boostLinkLibs)
     IF (BUILD_PLAYERCC_BOOST)
@@ -20,7 +19,6 @@
                   PLAYERCC_ADD_LINK_LIB (boost_thread)
                   INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
                   LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
-                  APPEND_TO_CACHED_STRING (PLAYERCC_DEFINITIONS "libplayerc++ 
defines" -DHAVE_BOOST_THREAD -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT)
                   SET (boostLinkLibs "${boostLinkLibs} -lboost_thread")
               ELSE (USE_BOOST_THREADS)
                   MESSAGE (STATUS "PlayerC++ client library Boost::Thread 
support disabled by user.")
@@ -28,7 +26,7 @@
           ELSE (HAVE_BOOST_THREAD)
               MESSAGE (STATUS "PlayerC++ client library Boost::Thread support 
disabled - Boost::Thread library not found.")
           ENDIF (HAVE_BOOST_THREAD)
-  
+
           SET (HAVE_BOOST_SIGNALS TRUE INTERNAL)
           IF (HAVE_BOOST_SIGNALS)
               OPTION (USE_BOOST_SIGNALS "Use the Boost signalling library" ON)
@@ -38,7 +36,6 @@
                   PLAYERCC_ADD_LINK_LIB (boost_signals)
                   INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
                   LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
-                  APPEND_TO_CACHED_STRING (PLAYERCC_DEFINITIONS "libplayerc++ 
defines" -DHAVE_BOOST_SIGNALS)
                   SET (boostLinkLibs "${boostLinkLibs} -lboost_signals")
               ELSE (USE_BOOST_SIGNALS)
                   MESSAGE (STATUS "PlayerC++ client library Boost::Signals 
support disabled by user.")
@@ -53,8 +50,14 @@
         MESSAGE (STATUS "Boost support disabled. Boost::Signals and 
Boost::Thread support will not be included in PlayerC++.")
     ENDIF (BUILD_PLAYERCC_BOOST)
 
-    INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs)
+    # Auto-generate playerc++config.h.
+    SET (playercppconfig_h_in 
"${CMAKE_CURRENT_SOURCE_DIR}/playerc++config.h.in")
+    SET (playercppconfig_h "${CMAKE_CURRENT_BINARY_DIR}/playerc++config.h")
+    CONFIGURE_FILE (${playercppconfig_h_in} ${playercppconfig_h})
 
+    INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs
+                         ${PROJECT_BINARY_DIR}/client_libs)
+
     SET (playerccSrcs   playerc++.h
                         debug.h
                         playerclient.h
@@ -102,10 +105,14 @@
                         wifiproxy.cc
                         wsnproxy.cc)
 
-    ADD_DEFINITIONS (${PLAYERCC_DEFINITIONS})
-    PLAYER_ADD_LIBRARY (playerc++ ${playerccSrcs})
+    PLAYER_ADD_LIBRARY (playerc++ ${playerccSrcs} ${playercppconfig_h})
     TARGET_LINK_LIBRARIES (playerc++ playerxdr playerutils playerc 
${PLAYERCC_EXTRA_LINK_LIBRARIES})
     PLAYER_MAKE_PKGCONFIG ("playerc++" "C++ wrapper for libplayerc - part of 
the Player Project" "playerxdr playerc" "" "" "-lm ${boostLinkLibs}")
 
-    PLAYER_INSTALL_HEADERS (playerc++ clientproxy.h playerc++.h playerclient.h 
playererror.h utility.h)
+    PLAYER_INSTALL_HEADERS (playerc++ ${playercppconfig_h}
+                                      clientproxy.h
+                                      playerc++.h
+                                      playerclient.h
+                                      playererror.h
+                                      utility.h)
 ENDIF (BUILD_PLAYERCC)

Modified: code/player/trunk/client_libs/libplayerc++/debug.h
===================================================================
--- code/player/trunk/client_libs/libplayerc++/debug.h  2008-06-10 06:35:33 UTC 
(rev 6505)
+++ code/player/trunk/client_libs/libplayerc++/debug.h  2008-06-10 06:35:48 UTC 
(rev 6506)
@@ -45,7 +45,7 @@
 #ifndef UTIL_DEBUG_H
 #define UTIL_DEBUG_H
 
-#include "config.h"
+#include <playerconfig.h>
 
 #include <iostream>
 

Modified: code/player/trunk/client_libs/libplayerc++/playerc++.h
===================================================================
--- code/player/trunk/client_libs/libplayerc++/playerc++.h      2008-06-10 
06:35:33 UTC (rev 6505)
+++ code/player/trunk/client_libs/libplayerc++/playerc++.h      2008-06-10 
06:35:48 UTC (rev 6506)
@@ -949,8 +949,8 @@
 
     /**  Reset orientation. */
     void ResetOrientation(int aValue);
-    
 
+
 };
 
 
@@ -1105,7 +1105,7 @@
     /// Request the current laser configuration; it is read into the
     /// relevant class attributes.
     void RequestConfigure();
-    
+
     /// Request the ID of the laser; read it with GetID()
     void RequestID();
 
@@ -1149,17 +1149,17 @@
       b.sw = mDevice->size[1];
       return(b);
     }
-    
+
     /// Minimum range reading on the left side
     double GetMinLeft() const
       { return GetVar(mDevice->min_left); };
-    
+
     /// Minimum range reading on the right side
     double GetMinRight() const
       { return GetVar(mDevice->min_right); };
-           
+
     /// @deprecated Minimum range reading on the left side
-    double MinLeft () const 
+    double MinLeft () const
       { return GetMinLeft(); }
 
     /// @deprecated Minimum range reading on the right side
@@ -2462,7 +2462,7 @@
                         int     GetLinkEncrypt(int index)  const {return 
mDevice->links[index].encrypt; };
                         int   GetLinkQuality(int index)  const { return 
mDevice->links[index].qual; };
                         int     GetLinkLevel(int index)  const {return 
mDevice->links[index].level; };
-                        int     GetLinkNoise(int index)  const {return 
mDevice->links[index].noise; }  ;                
+                        int     GetLinkNoise(int index)  const {return 
mDevice->links[index].noise; }  ;
 
                        //player_wifi_link_t
 //     int GetLinkQuality(char/// ip = NULL);

Added: code/player/trunk/client_libs/libplayerc++/playerc++config.h.in
===================================================================
--- code/player/trunk/client_libs/libplayerc++/playerc++config.h.in             
                (rev 0)
+++ code/player/trunk/client_libs/libplayerc++/playerc++config.h.in     
2008-06-10 06:35:48 UTC (rev 6506)
@@ -0,0 +1,7 @@
+#cmakedefine HAVE_BOOST_THREAD
+#cmakedefine HAVE_BOOST_SIGNALS
+
+#if defined (HAVE_BOOST_THREAD)
+#define _POSIX_PTHREAD_SEMANTICS
+#define _REENTRANT
+#endif
\ No newline at end of file

Modified: code/player/trunk/client_libs/libplayerc++/playerclient.h
===================================================================
--- code/player/trunk/client_libs/libplayerc++/playerclient.h   2008-06-10 
06:35:33 UTC (rev 6505)
+++ code/player/trunk/client_libs/libplayerc++/playerclient.h   2008-06-10 
06:35:48 UTC (rev 6506)
@@ -45,6 +45,7 @@
 #define PLAYERCLIENT_H
 
 #include "libplayerc++/utility.h"
+#include "libplayerc++/playerc++config.h"
 
 #include <string>
 #include <list>
@@ -184,7 +185,7 @@
     /// @brief Set the timeout for client requests
     void SetRequestTimeout(uint32_t seconds) { 
playerc_client_set_request_timeout(this->mClient,seconds); }
 
-    
+
     /// @brief Set connection retry limit, which is the number of times
     /// that we'll try to reconnect to the server after a socket error.
     /// Set to -1 for inifinite retry.
@@ -277,7 +278,7 @@
 
     /// Get the name for a given interface code
     std::string LookupName(int aCode) const;
-    
+
     /// Get count of the number of discarded messages on the server since the 
last call to this method
     uint32_t GetOverflowCount();
 };

Modified: code/player/trunk/client_libs/libplayerc++/test/CMakeLists.txt
===================================================================
--- code/player/trunk/client_libs/libplayerc++/test/CMakeLists.txt      
2008-06-10 06:35:33 UTC (rev 6505)
+++ code/player/trunk/client_libs/libplayerc++/test/CMakeLists.txt      
2008-06-10 06:35:48 UTC (rev 6506)
@@ -3,7 +3,7 @@
     OPTION (BUILD_CC_TESTS "Build the C++ client library tests" ON)
 
     IF (BUILD_CC_TESTS)
-        INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs)
+        INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs 
${PROJECT_BINARY_DIR}/client_libs)
         SET (testsSrcs  test.cc
                         test.h
                         test_camera.cc


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to