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