Added preprending of osgPlugins-version to plugin names

This commit is contained in:
Robert Osfield
2007-08-11 17:44:06 +00:00
parent d57a16e023
commit babe9f6de0
2 changed files with 10 additions and 8 deletions

View File

@@ -18,6 +18,7 @@
#include <osg/Group>
#include <osg/Geode>
#include <osg/ApplicationUsage>
#include <osg/Version>
#include <osgDB/Registry>
#include <osgDB/FileUtils>
@@ -548,7 +549,6 @@ std::string Registry::createLibraryNameForFile(const std::string& fileName)
return createLibraryNameForExtension(ext);
}
std::string Registry::createLibraryNameForExtension(const std::string& ext)
{
@@ -556,9 +556,14 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext)
if (itr!=_extAliasMap.end() && ext != itr->second) return createLibraryNameForExtension(itr->second);
#ifdef OSG_JAVA_BUILD
static std::string prepend = "java";
#else
static std::string prepend = std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/java");
#elseif defined(__APPLE__)
// OSX is rather a mess in FileUtils.cpp w.r.t its appendPlatformSpecificLibraryFilePaths implementation
// as it hardwires the plugin name to PlugIns. This *needs* fixing to use the naming convention as all
// other platforms.
static std::string prepend = "";
#else
static std::string prepend = std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/");
#endif
#if defined(WIN32)