Introduced a OSG_PLUGIN_PREFIX variable into CMake build system with it set to

"" for all platforms except Cygwin where its set to "cygwin_" and Mingw where
it is set to "mingw_".  Updated osgDB::Registry to look for these for the plugins.
Updated the osgintrospection example to search for these names as well.
This commit is contained in:
Robert Osfield 2007-10-02 21:26:22 +00:00
parent 441b0c34bd
commit 55d5a4d28a
5 changed files with 21 additions and 11 deletions

View File

@ -23,6 +23,17 @@ SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINO
SET(OSG_PLUGINS osgPlugins-${OPENSCENEGRAPH_VERSION})
SET(OSG_PLUGIN_PREFIX "")
IF (CYGWIN)
SET(OSG_PLUGIN_PREFIX "cygwin_")
ENDIF(CYGWIN)
IF(MINGW)
SET(OSG_PLUGIN_PREFIX "mingw_")
ENDIF(MINGW)
# We want to build SONAMES shared librariess
SET(OPENSCENEGRAPH_SONAMES TRUE)
SET(OPENTHREADS_SONAMES TRUE)
@ -87,6 +98,9 @@ INCLUDE_DIRECTORIES(
#ADD_DEFINITIONS(-D)
# Platform specific definitions
IF(WIN32)
ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)

View File

@ -38,9 +38,9 @@ std::string createLibraryNameForWrapper(const std::string& ext)
#if defined(WIN32)
// !! recheck evolving Cygwin DLL extension naming protocols !! NHV
#ifdef __CYGWIN__
return "cygosgwrapper_"+ext+".dll";
return "cygwin_osgwrapper_"+ext+".dll";
#elif defined(__MINGW32__)
return "libosgwrapper_"+ext+".dll";
return "mingw_osgwrapper_"+ext+".dll";
#else
#ifdef _DEBUG
return "osgwrapper_"+ext+"d.dll";

View File

@ -585,9 +585,9 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext)
#if defined(WIN32)
// !! recheck evolving Cygwin DLL extension naming protocols !! NHV
#ifdef __CYGWIN__
return prepend+"cyg"+"osgdb_"+lowercase_ext+".dll";
return prepend+"cygwin_"+"osgdb_"+lowercase_ext+".dll";
#elif defined(__MINGW32__)
return prepend+"lib"+"osgdb_"+lowercase_ext+".dll";
return prepend+"mingw_"+"osgdb_"+lowercase_ext+".dll";
#else
#ifdef _DEBUG
return prepend+"osgdb_"+lowercase_ext+"d.dll";

View File

@ -11,9 +11,7 @@ IF(NOT MSVC)
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
ENDIF(NOT MSVC)
IF(NOT MINGW)
SET(CMAKE_SHARED_MODULE_PREFIX "")
ENDIF(NOT MINGW)
SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})
SET(TARGET_DEFAULT_PREFIX "osgdb_")

View File

@ -2,9 +2,7 @@ PROJECT(OSG_WRAPPERS)
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
IF(NOT MINGW)
SET(CMAKE_SHARED_MODULE_PREFIX "")
ENDIF(NOT MINGW)
SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})
MACRO(ADD_WRAPPER_LIB SUBDIR EXPORTDEF)