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:
parent
dd796df02a
commit
9497d75cc9
@ -18,6 +18,8 @@ SET(OPENSCENEGRAPH_MAJOR_VERSION 1)
|
|||||||
SET(OPENSCENEGRAPH_MINOR_VERSION 9)
|
SET(OPENSCENEGRAPH_MINOR_VERSION 9)
|
||||||
SET(OPENSCENEGRAPH_PATCH_VERSION 4)
|
SET(OPENSCENEGRAPH_PATCH_VERSION 4)
|
||||||
|
|
||||||
|
SET(OSG_PLUGINS osgPlugins-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
|
||||||
|
|
||||||
SET(OpenThreads_SOURCE_DIR ${OpenSceneGraph_SOURCE_DIR})
|
SET(OpenThreads_SOURCE_DIR ${OpenSceneGraph_SOURCE_DIR})
|
||||||
|
|
||||||
# We have some custom .cmake scripts not in the official distribution.
|
# We have some custom .cmake scripts not in the official distribution.
|
||||||
@ -176,12 +178,11 @@ ELSE(NOT APPLE)
|
|||||||
FIND_PACKAGE(QuickTime)
|
FIND_PACKAGE(QuickTime)
|
||||||
ENDIF(NOT APPLE)
|
ENDIF(NOT APPLE)
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Create bin and lib directories if required
|
# Create bin and lib directories if required
|
||||||
|
|
||||||
IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||||
FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin ${CMAKE_BINARY_DIR}/lib ${CMAKE_BINARY_DIR}/lib/osgPlugins)
|
FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin ${CMAKE_BINARY_DIR}/lib ${CMAKE_BINARY_DIR}/lib/${OSG_PLUGINS})
|
||||||
ENDIF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
ENDIF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||||
|
|
||||||
|
|
||||||
@ -208,7 +209,7 @@ SET(EXECUTABLE_OUTPUT_PATH ${OUTPUT_BINDIR})
|
|||||||
#SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib/${CMAKE_SYSTEM_NAME})
|
#SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib/${CMAKE_SYSTEM_NAME})
|
||||||
SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib)
|
SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib)
|
||||||
MAKE_DIRECTORY(${OUTPUT_LIBDIR})
|
MAKE_DIRECTORY(${OUTPUT_LIBDIR})
|
||||||
MAKE_DIRECTORY(${OUTPUT_LIBDIR}/osgPlugins)
|
MAKE_DIRECTORY(${OUTPUT_LIBDIR}/${OSG_PLUGINS})
|
||||||
SET(LIBRARY_OUTPUT_PATH ${OUTPUT_LIBDIR})
|
SET(LIBRARY_OUTPUT_PATH ${OUTPUT_LIBDIR})
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,11 +121,11 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
|
|||||||
|
|
||||||
SETUP_LINK_LIBRARIES()
|
SETUP_LINK_LIBRARIES()
|
||||||
|
|
||||||
#the installation path are differentiated for win32 that install in bib versus other architecture that install in lib${LIB_POSTFIX}/osgPlugins
|
#the installation path are differentiated for win32 that install in bib versus other architecture that install in lib${LIB_POSTFIX}/${OSG_PLUGINS}
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION bin )
|
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION bin )
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib${LIB_POSTFIX}/osgPlugins LIBRARY DESTINATION lib${LIB_POSTFIX}/osgPlugins )
|
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} )
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
ENDMACRO(SETUP_PLUGIN)
|
ENDMACRO(SETUP_PLUGIN)
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <osg/Notify>
|
#include <osg/Notify>
|
||||||
|
#include <osg/Version>
|
||||||
|
|
||||||
#include <osgDB/FileUtils>
|
#include <osgDB/FileUtils>
|
||||||
#include <osgDB/FileNameUtils>
|
#include <osgDB/FileNameUtils>
|
||||||
@ -73,6 +74,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
||||||
|
|
||||||
|
const std::string OSG_PLUGINS(std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/"));
|
||||||
|
|
||||||
bool osgDB::makeDirectory( const std::string &path )
|
bool osgDB::makeDirectory( const std::string &path )
|
||||||
{
|
{
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
@ -315,7 +319,7 @@ std::string osgDB::findLibraryFile(const std::string& filename,CaseSensitivity c
|
|||||||
|
|
||||||
// failed with direct paths,
|
// failed with direct paths,
|
||||||
// now try prepending the filename with "osgPlugins/"
|
// 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)
|
std::string osgDB::findFileInDirectory(const std::string& fileName,const std::string& dirName,CaseSensitivity caseSensitivity)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
PROJECT(OSG_PLUGINS_MASTER)
|
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)
|
OPTION(BUILD_OSG_COMMON_PLUGINS "Build with Common Plugins" TRUE)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
PROJECT(OSG_WRAPPERS)
|
PROJECT(OSG_WRAPPERS)
|
||||||
|
|
||||||
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/osgPlugins")
|
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
|
||||||
|
|
||||||
IF(NOT MINGW)
|
IF(NOT MINGW)
|
||||||
SET(CMAKE_SHARED_MODULE_PREFIX "")
|
SET(CMAKE_SHARED_MODULE_PREFIX "")
|
||||||
@ -78,7 +78,7 @@ MACRO(ADD_WRAPPER_LIB SUBDIR EXPORTDEF)
|
|||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
INSTALL(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION bin )
|
INSTALL(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION bin )
|
||||||
ELSE(WIN32)
|
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)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ENDMACRO(ADD_WRAPPER_LIB)
|
ENDMACRO(ADD_WRAPPER_LIB)
|
||||||
|
Loading…
Reference in New Issue
Block a user