From 3ff22d526cc2520720b5845de3052d4460590833 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 7 Jan 2005 20:01:06 +0000 Subject: [PATCH] From Tree, change to naming of plugins when building OSG with Java to avoid conflicts. --- src/osgDB/Registry.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index 28e310e41..c650abebc 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -450,26 +450,32 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext) ExtensionAliasMap::iterator itr=_extAliasMap.find(ext); if (itr!=_extAliasMap.end()) return createLibraryNameForExtension(itr->second); +#ifdef OSG_JAVA_BUILD + static std::string prepend = "java"; +#else + static std::string prepend = ""; +#endif + #if defined(WIN32) // !! recheck evolving Cygwin DLL extension naming protocols !! NHV #ifdef __CYGWIN__ - return "cygosgdb_"+ext+".dll"; + return "cyg"+prepend+"osgdb_"+ext+".dll"; #elif defined(__MINGW32__) - return "libosgdb_"+ext+".dll"; + return "lib"+prepend+"osgdb_"+ext+".dll"; #else #ifdef _DEBUG - return "osgdb_"+ext+"d.dll"; + return prepend+"osgdb_"+ext+"d.dll"; #else - return "osgdb_"+ext+".dll"; + return prepend+"osgdb_"+ext+".dll"; #endif #endif #elif macintosh - return "osgdb_"+ext; + return prepend+"osgdb_"+ext; #elif defined(__hpux__) // why don't we use PLUGIN_EXT from the makefiles here? - return "osgdb_"+ext+".sl"; + return prepend+"osgdb_"+ext+".sl"; #else - return "osgdb_"+ext+".so"; + return prepend+"osgdb_"+ext+".so"; #endif }