From: Michael Janssen <jamuraa@base0.net>
Date: Wed, 15 Dec 2010 18:04:21 -0600
Subject: [PATCH] Add debian plugins directory

---
 libplayercore/plugins.cc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/libplayercore/plugins.cc b/libplayercore/plugins.cc
index e6bf23e..00d0762 100644
--- a/libplayercore/plugins.cc
+++ b/libplayercore/plugins.cc
@@ -129,6 +129,13 @@ LoadPlugin(const char* pluginname, const char* cfgfile)
     strncat( installdir, "/lib/", PATH_MAX);
     if( lt_dladdsearchdir( installdir ) )
       PLAYER_ERROR1( "failed to add working directory %s to the plugin path", installdir );
+
+    // add $PLAYER_INSTALL_PREFIX/lib/robot-player
+    char pluginsdir[ PATH_MAX ];
+    strncpy( installdir, PLAYER_INSTALL_PREFIX, PATH_MAX);
+    strncat( installdir, "/lib/robot-player", PATH_MAX);
+    if( lt_dladdsearchdir( installdir ) )
+      PLAYER_ERROR1( "failed to add debian plugins directory %s to the plugin path", installdir );
   }
 
   PLAYER_MSG1(3, "loading plugin %s", pluginname);
-- 
