Revision: 7673
http://playerstage.svn.sourceforge.net/playerstage/?rev=7673&view=rev
Author: natepak
Date: 2009-05-15 17:20:26 +0000 (Fri, 15 May 2009)
Log Message:
-----------
Added libtool search in cmake
Modified Paths:
--------------
code/gazebo/trunk/cmake/SearchForStuff.cmake
code/gazebo/trunk/config.h.in
code/gazebo/trunk/server/CMakeLists.txt
code/gazebo/trunk/server/World.cc
code/gazebo/trunk/server/World.hh
code/gazebo/trunk/server/controllers/ControllerFactory.cc
code/gazebo/trunk/server/controllers/factory/Factory.cc
Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/trunk/cmake/SearchForStuff.cmake 2009-05-15 16:03:15 UTC
(rev 7672)
+++ code/gazebo/trunk/cmake/SearchForStuff.cmake 2009-05-15 17:20:26 UTC
(rev 7673)
@@ -318,4 +318,25 @@
CACHE INTERNAL "Link flags for profile" FORCE)
ENDIF (TCMALLOC)
+########################################
+# Find libtool
+FIND_PATH(libtool_include_dir ltdl.h /usr/include /usr/local/include)
+IF (NOT libtool_include_dir)
+ MESSAGE (STATUS "Looking for ltdl.h - not found")
+ MESSAGE (STATUS "Warning: Unable to find libtool, plugins will not be
supported.")
+ SET (libtool_include_dir /usr/include)
+ELSE (NOT libtool_include_dir)
+ MESSAGE (STATUS "Looking for ltdl.h - found")
+ENDIF (NOT libtool_include_dir)
+FIND_LIBRARY(libtool_library ltdl /usr/lib /usr/local/lib)
+IF (NOT libtool_library)
+ MESSAGE (STATUS "Looking for libltdl - not found")
+ MESSAGE (STATUS "Warning: Unable to find libtool, plugins will not be
supported.")
+ELSE (NOT libtool_library)
+ MESSAGE (STATUS "Looking for libltdl - found")
+ENDIF (NOT libtool_library)
+
+IF (libtool_library AND libtool_include_dir)
+ SET (HAVE_LTDL TRUE)
+ENDIF (libtool_library AND libtool_include_dir)
Modified: code/gazebo/trunk/config.h.in
===================================================================
--- code/gazebo/trunk/config.h.in 2009-05-15 16:03:15 UTC (rev 7672)
+++ code/gazebo/trunk/config.h.in 2009-05-15 17:20:26 UTC (rev 7673)
@@ -5,3 +5,4 @@
#cmakedefine HAVE_OPENAL 1
#cmakedefine HAVE_FFMPEG 1
+#cmakedefine HAVE_LTDL 1
Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt 2009-05-15 16:03:15 UTC (rev
7672)
+++ code/gazebo/trunk/server/CMakeLists.txt 2009-05-15 17:20:26 UTC (rev
7673)
@@ -20,6 +20,7 @@
sensors/ray
${LIBAVCODEC_PATH}
${LIBAVFORMAT_PATH}
+ ${libtool_include_path}
${gazeboserver_include_dirs}
${boost_include_dirs}
${freeimage_include_dir}
@@ -107,7 +108,7 @@
${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}})
ENDIF (CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE})
-TARGET_LINK_LIBRARIES( gazebo-exec
+TARGET_LINK_LIBRARIES( gazebo-exec ${libtool_library}
${gazeboserver_link_libs}
${boost_libraries}
${freeimage_library}
@@ -115,9 +116,10 @@
gazebo_av
gazebo_gui
gazebo
+
)
-TARGET_LINK_LIBRARIES( gazebo_server ${ODE_LIBRARIES} gazebo)
+TARGET_LINK_LIBRARIES( gazebo_server ${ODE_LIBRARIES} ${libtool_library}
gazebo)
INSTALL (TARGETS gazebo-exec DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
INSTALL (TARGETS gazebo_server DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
Modified: code/gazebo/trunk/server/World.cc
===================================================================
--- code/gazebo/trunk/server/World.cc 2009-05-15 16:03:15 UTC (rev 7672)
+++ code/gazebo/trunk/server/World.cc 2009-05-15 17:20:26 UTC (rev 7673)
@@ -364,8 +364,9 @@
////////////////////////////////////////////////////////////////////////////////
// Add a new entity to the world
-void World::InsertEntity( const std::string xmlString)
+void World::InsertEntity( std::string xmlString)
{
+ boost::recursive_mutex::scoped_lock lock(*Simulator::Instance()->GetMutex());
this->toLoadEntities.push_back( xmlString );
}
@@ -373,6 +374,7 @@
// Load all the entities that have been queued
void World::ProcessEntitiesToLoad()
{
+ boost::recursive_mutex::scoped_lock lock(*Simulator::Instance()->GetMutex());
std::vector< std::string >::iterator iter;
for (iter = this->toLoadEntities.begin();
Modified: code/gazebo/trunk/server/World.hh
===================================================================
--- code/gazebo/trunk/server/World.hh 2009-05-15 16:03:15 UTC (rev 7672)
+++ code/gazebo/trunk/server/World.hh 2009-05-15 17:20:26 UTC (rev 7673)
@@ -124,7 +124,7 @@
// (encoded as an XML string) onto a list. The Graphics Thread will then
// call the ProcessEntitiesToLoad function to actually make the new
// entities. This Producer-Consumer model is necessary for thread safety.
- public: void InsertEntity(const std::string xmlString);
+ public: void InsertEntity(std::string xmlString);
/// \brief Load all the entities that have been queued
public: void ProcessEntitiesToLoad();
Modified: code/gazebo/trunk/server/controllers/ControllerFactory.cc
===================================================================
--- code/gazebo/trunk/server/controllers/ControllerFactory.cc 2009-05-15
16:03:15 UTC (rev 7672)
+++ code/gazebo/trunk/server/controllers/ControllerFactory.cc 2009-05-15
17:20:26 UTC (rev 7673)
@@ -25,11 +25,15 @@
* SVN info: $Id$
*/
+#include "config.h"
+
#include "GazeboError.hh"
#include "Entity.hh"
#include "gazebo.h"
#include "Controller.hh"
#include "ControllerFactory.hh"
+
+
#ifdef HAVE_LTDL
#include <ltdl.h>
#endif // HAVE_LTDL
Modified: code/gazebo/trunk/server/controllers/factory/Factory.cc
===================================================================
--- code/gazebo/trunk/server/controllers/factory/Factory.cc 2009-05-15
16:03:15 UTC (rev 7672)
+++ code/gazebo/trunk/server/controllers/factory/Factory.cc 2009-05-15
17:20:26 UTC (rev 7673)
@@ -108,12 +108,12 @@
}
// Attempt to delete a model by name, if the string is present
- if (strcmp((const char*)this->factoryIface->data->deleteModel,"")!=0)
+ /*if (strcmp((const char*)this->factoryIface->data->deleteModel,"")!=0)
{
World::Instance()->DeleteEntity((const
char*)this->factoryIface->data->deleteModel);
strcpy((char*)this->factoryIface->data->deleteModel,"");
- }
+ }*/
this->factoryIface->Unlock();
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit