Blob Blame History Raw
diff -up ./cmake/internal/SetupDirectories.cmake.fixlibload ./cmake/internal/SetupDirectories.cmake
--- ./cmake/internal/SetupDirectories.cmake.fixlibload	2010-01-09 22:59:16.000000000 -0500
+++ ./cmake/internal/SetupDirectories.cmake	2010-01-09 23:03:17.000000000 -0500
@@ -19,3 +19,8 @@ ELSE (PLAYER_PROC_64BIT)
     MESSAGE (STATUS "Player libraries will be in lib")
 ENDIF (PLAYER_PROC_64BIT)
 
+IF (PLAYER_OS_WIN)
+    SET(PLAYER_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}\\lib")
+ELSE(PLAYER_OS_WIN)
+    SET(PLAYER_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/${PLAYER_LIBRARY_INSTALL_DIR}/player/")
+ENDIF(PLAYER_OS_WIN)
diff -up ./config.h.in.fixlibload ./config.h.in
--- ./config.h.in.fixlibload	2010-01-09 22:57:28.000000000 -0500
+++ ./config.h.in	2010-01-09 23:05:03.000000000 -0500
@@ -2,6 +2,8 @@
 
 /* Install prefix */
 #define PLAYER_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
+#define PLAYER_LIBRARY_DIR "@PLAYER_LIBRARY_INSTALL_DIR@"
+#define PLAYER_PLUGIN_PATH "@PLAYER_PLUGIN_PATH@"
 
 /* enable TCP_NODELAY */
 #cmakedefine ENABLE_TCP_NODELAY 1
diff -up ./libplayercore/plugins.cc.fixlibload ./libplayercore/plugins.cc
--- ./libplayercore/plugins.cc.fixlibload	2009-08-10 23:44:43.000000000 -0400
+++ ./libplayercore/plugins.cc	2010-01-09 23:09:48.000000000 -0500
@@ -122,13 +122,20 @@ LoadPlugin(const char* pluginname, const
         PLAYER_ERROR1( "failed to add config file directory %s to the plugin path", cfgdir );
       free(tmp);
     }
+    
+    // add $PLAYER_INSTALL_PREFIX/lib(64)/player/
+    if( lt_dladdsearchdir( PLAYER_PLUGIN_PATH ) )
+      PLAYER_ERROR1( "failed to add working directory %s to the plugin path", PLAYER_PLUGIN_PATH );
 
-    // add $PLAYER_INSTALL_PREFIX/lib
+    // add $PLAYER_INSTALL_PREFIX/lib(64)/
     char installdir[ PATH_MAX ];
     strncpy( installdir, PLAYER_INSTALL_PREFIX, PATH_MAX);
-    strncat( installdir, "/lib/", PATH_MAX);
+    strncat( installdir, "/", PATH_MAX);
+    strncat( installdir, PLAYER_LIBRARY_DIR, PATH_MAX);
+    strncat( installdir, "/", PATH_MAX);
     if( lt_dladdsearchdir( installdir ) )
       PLAYER_ERROR1( "failed to add working directory %s to the plugin path", installdir );
+    
   }
 
   PLAYER_MSG1(3, "loading plugin %s", pluginname);
@@ -144,7 +151,7 @@ LoadPlugin(const char* pluginname, const
 
   return handle;
 #elif defined (WIN32)
-  std::vector<std::string> paths;
+  std::vector<std::string> paths;   
 
   if(pluginname[0] == '/' || pluginname[0] == '~')
   {