Added support for version of the osgPlugins directory, which now gets versioned

according to the OpenSceneGraph/CMakeLists.txt and the include/osg/Version settings.
These changes mean that the 1.9.5 release will have a libs/osgPlugins-1.9.5 directory.
This commit is contained in:
Robert Osfield
2007-05-20 12:29:11 +00:00
parent dd796df02a
commit 9497d75cc9
5 changed files with 14 additions and 9 deletions

View File

@@ -65,6 +65,7 @@
#endif
#include <osg/Notify>
#include <osg/Version>
#include <osgDB/FileUtils>
#include <osgDB/FileNameUtils>
@@ -73,6 +74,9 @@
#include <errno.h>
#include <stack>
const std::string OSG_PLUGINS(std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/"));
bool osgDB::makeDirectory( const std::string &path )
{
if (path.empty())
@@ -315,7 +319,7 @@ std::string osgDB::findLibraryFile(const std::string& filename,CaseSensitivity c
// failed with direct paths,
// now try prepending the filename with "osgPlugins/"
return findFileInPath("osgPlugins/"+simpleFileName,filepath,caseSensitivity);
return findFileInPath(OSG_PLUGINS+simpleFileName,filepath,caseSensitivity);
}
std::string osgDB::findFileInDirectory(const std::string& fileName,const std::string& dirName,CaseSensitivity caseSensitivity)

View File

@@ -7,7 +7,7 @@
PROJECT(OSG_PLUGINS_MASTER)
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/osgPlugins")
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
OPTION(BUILD_OSG_COMMON_PLUGINS "Build with Common Plugins" TRUE)

View File

@@ -1,6 +1,6 @@
PROJECT(OSG_WRAPPERS)
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/osgPlugins")
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
IF(NOT MINGW)
SET(CMAKE_SHARED_MODULE_PREFIX "")
@@ -78,7 +78,7 @@ MACRO(ADD_WRAPPER_LIB SUBDIR EXPORTDEF)
IF(WIN32)
INSTALL(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION bin )
ELSE(WIN32)
INSTALL(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib${LIB_POSTFIX}/osgPlugins LIBRARY DESTINATION lib${LIB_POSTFIX}/osgPlugins )
INSTALL(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} )
ENDIF(WIN32)
ENDMACRO(ADD_WRAPPER_LIB)