Added support for initial cut of static build of Present3D.

This commit is contained in:
Robert Osfield 2009-06-20 17:03:38 +00:00
parent cc4cc7b403
commit 771101d79b
7 changed files with 54 additions and 10 deletions

View File

@ -38,5 +38,6 @@ ELSE()
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ADD_SUBDIRECTORY(osgversion)
ADD_SUBDIRECTORY(present3D)
ENDIF()

View File

@ -54,8 +54,24 @@ ENDIF()
SET(TARGET_ADDED_LIBRARIES osgVolume osgFX)
IF (NOT DYNAMIC_OPENSCENEGRAPH)
SET(TARGET_ADDED_LIBRARIES
${TARGET_ADDED_LIBRARIES}
osgdb_ive
osgdb_freetype
osgdb_openflight
osgdb_osg
osgdb_rgb
osgdb_jpeg
osgdb_png
osgdb_ffmpeg
)
ENDIF()
IF (WIN32)
# to support cluster code
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32)
ENDIF()
SETUP_APPLICATION(present3D-osg)

View File

@ -207,8 +207,10 @@ public:
};
// Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterP3DXML> g_readerWriter_P3DXML_Proxy;
// now register with Registry to instantiate the above
// reader/writer.
REGISTER_OSGPLUGIN(p3d, ReaderWriterP3DXML)
std::string ReaderWriterP3DXML::expandEnvVarsInFileName(const std::string& filename) const
{

View File

@ -70,8 +70,10 @@ public:
virtual osgDB::ReaderWriter::ReadResult read_rotation_path(std::istream& fin, const osgDB::Options* options) const;
};
// Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterPaths> g_readerWriter_PathsL_Proxy;
// now register with Registry to instantiate the above
// reader/writer.
REGISTER_OSGPLUGIN(paths, ReaderWriterPaths)
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(const std::string& file, const osgDB::Options* options) const
{

View File

@ -54,6 +54,26 @@
#include "SDLIntegration.h"
#endif
#if OSG_LIBRARY_STATIC
// include the plugins we need
USE_OSGPLUGIN(ive)
USE_OSGPLUGIN(freetype)
USE_OSGPLUGIN(osg)
USE_OSGPLUGIN(rgb)
USE_OSGPLUGIN(OpenFlight)
USE_OSGPLUGIN(png)
USE_OSGPLUGIN(jpeg)
USE_OSGPLUGIN(ffmpeg)
USE_OSGPLUGIN(p3d)
USE_OSGPLUGIN(paths)
// include the platform specific GraphicsWindow implementation.
USE_GRAPHICSWINDOW()
#endif
static const char* s_version = "1.3";
void setViewer(osgViewer::Viewer& viewer, float width, float height, float distance)

View File

@ -207,8 +207,10 @@ public:
};
// Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterP3DXML> g_readerWriter_P3DXML_Proxy;
// now register with Registry to instantiate the above
// reader/writer.
REGISTER_OSGPLUGIN(p3d, ReaderWriterP3DXML)
std::string ReaderWriterP3DXML::expandEnvVarsInFileName(const std::string& filename) const
{

View File

@ -70,8 +70,9 @@ public:
virtual osgDB::ReaderWriter::ReadResult read_rotation_path(std::istream& fin, const osgDB::Options* options) const;
};
// Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterPaths> g_readerWriter_PathsL_Proxy;
// now register with Registry to instantiate the above
// reader/writer.
REGISTER_OSGPLUGIN(paths, ReaderWriterPaths)
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(const std::string& file, const osgDB::Options* options) const
{