From abea92ee9170899b8a3c2646ae5d6a995fdb75c8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 24 Jan 2011 21:12:25 +0000 Subject: [PATCH] From Mathias Froehlich, build fixes --- include/osg/BufferObject | 1 + src/osgDB/DatabasePager.cpp | 4 +--- src/osgPlugins/osg/AsciiStreamOperator.h | 5 +++-- src/osgPlugins/osg/XmlStreamOperator.h | 2 +- src/osgViewer/CMakeLists.txt | 3 +++ 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/osg/BufferObject b/include/osg/BufferObject index b5eeb373a..3ac8b1de8 100644 --- a/include/osg/BufferObject +++ b/include/osg/BufferObject @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/src/osgDB/DatabasePager.cpp b/src/osgDB/DatabasePager.cpp index af54d7784..5b480fab8 100644 --- a/src/osgDB/DatabasePager.cpp +++ b/src/osgDB/DatabasePager.cpp @@ -228,9 +228,7 @@ public: if (_pagedLODs.erase(clod) > 0) leftToRemove--; } - childrenRemoved.insert(childrenRemoved.end(), - expiredChildren.begin(), - expiredChildren.end()); + std::copy(expiredChildren.begin(), expiredChildren.end(), std::back_inserter(childrenRemoved)); } // advance the iterator to the next element diff --git a/src/osgPlugins/osg/AsciiStreamOperator.h b/src/osgPlugins/osg/AsciiStreamOperator.h index e57674c6c..ddaa8d797 100644 --- a/src/osgPlugins/osg/AsciiStreamOperator.h +++ b/src/osgPlugins/osg/AsciiStreamOperator.h @@ -1,6 +1,7 @@ #ifndef OSGDB_ASCIISTREAMOPERATOR #define OSGDB_ASCIISTREAMOPERATOR +#include #include class AsciiOutputIterator : public osgDB::OutputIterator @@ -69,7 +70,7 @@ public: virtual void writeGLenum( const osgDB::ObjectGLenum& value ) { - GLenum e = value.get(); + GLenum e = value.get(); const std::string& enumString = osgDB::Registry::instance()->getObjectWrapperManager()->getString("GL", e); indentIfRequired(); *_out << enumString << ' '; } @@ -104,7 +105,7 @@ public: wrappedStr += ch; } - wrappedStr.insert( 0, 1, '\"' ); + wrappedStr.insert( std::string::size_type(0), 1, '\"' ); wrappedStr += '\"'; indentIfRequired(); diff --git a/src/osgPlugins/osg/XmlStreamOperator.h b/src/osgPlugins/osg/XmlStreamOperator.h index 60169840c..d45c019bb 100644 --- a/src/osgPlugins/osg/XmlStreamOperator.h +++ b/src/osgPlugins/osg/XmlStreamOperator.h @@ -161,7 +161,7 @@ public: else if ( ch=='\\' ) realStr += '\\'; realStr += ch; } - realStr.insert( 0, 1, '\"' ); + realStr.insert( std::string::size_type(0), 1, '\"' ); realStr += '\"'; addToCurrentNode( realStr ); } diff --git a/src/osgViewer/CMakeLists.txt b/src/osgViewer/CMakeLists.txt index 45394e594..1647ee88e 100644 --- a/src/osgViewer/CMakeLists.txt +++ b/src/osgViewer/CMakeLists.txt @@ -213,6 +213,9 @@ ELSE() SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:${CMAKE_OSX_SYSROOT}/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib") ENDIF() + ELSE(APPLE) + + SET(LIB_EXTRA_LIBS ${X11_X11_LIB} ${LIB_EXTRA_LIBS}) ENDIF(APPLE) ENDIF() ENDIF()