diff -Naur OpenSceneGraph-2.4.0.orig/CMakeModules/OsgMacroUtils.cmake OpenSceneGraph-2.4.0/CMakeModules/OsgMacroUtils.cmake
--- OpenSceneGraph-2.4.0.orig/CMakeModules/OsgMacroUtils.cmake 2008-02-18 16:26:46.000000000 +0100
+++ OpenSceneGraph-2.4.0/CMakeModules/OsgMacroUtils.cmake 2008-05-11 09:22:03.000000000 +0200
@@ -273,7 +273,7 @@
SETUP_EXE(${IS_COMMANDLINE_APP})
- INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin )
+ INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin )
ENDMACRO(SETUP_EXAMPLE)
diff -Naur OpenSceneGraph-2.4.0.orig/examples/CMakeLists.txt OpenSceneGraph-2.4.0/examples/CMakeLists.txt
--- OpenSceneGraph-2.4.0.orig/examples/CMakeLists.txt 2008-04-11 13:58:27.000000000 +0200
+++ OpenSceneGraph-2.4.0/examples/CMakeLists.txt 2008-05-11 09:20:51.000000000 +0200
@@ -87,7 +87,7 @@
ADD_SUBDIRECTORY(osgstereomatch)
ADD_SUBDIRECTORY(osgteapot)
ADD_SUBDIRECTORY(osgterrain)
- ADD_SUBDIRECTORY(osgtessellate)#)
+ ADD_SUBDIRECTORY(osgtessellate)
ADD_SUBDIRECTORY(osgtext)
ADD_SUBDIRECTORY(osgtext3D)
ADD_SUBDIRECTORY(osgtexture1D)
diff -Naur OpenSceneGraph-2.4.0.orig/src/osgPlugins/Inventor/ConvertFromInventor.cpp OpenSceneGraph-2.4.0/src/osgPlugins/Inventor/ConvertFromInventor.cpp
--- OpenSceneGraph-2.4.0.orig/src/osgPlugins/Inventor/ConvertFromInventor.cpp 2007-09-03 15:52:19.000000000 +0200
+++ OpenSceneGraph-2.4.0/src/osgPlugins/Inventor/ConvertFromInventor.cpp 2008-05-11 09:20:02.000000000 +0200
@@ -532,13 +532,14 @@
case SoTexture2::BLEND:
texEnv->setMode(osg::TexEnv::BLEND);
break;
-
+#ifdef __COIN__
// SGI's Inventor does not have REPLACE mode, but the Coin 3D library does.
// Coin supports REPLACE since 2.2 release, TGS Inventor from 4.0.
// Let's convert to the TexEnv anyway.
case (SoTexture2::Model)GL_REPLACE: // SoTexture2::REPLACE is the same as GL_REPLACE
texEnv->setMode(osg::TexEnv::REPLACE);
break;
+#endif
}
stateSet->setTextureAttributeAndModes(0,texEnv.get(),osg::StateAttribute::ON);
}
diff -Naur OpenSceneGraph-2.4.0.orig/src/osgPlugins/Inventor/ConvertToInventor.cpp OpenSceneGraph-2.4.0/src/osgPlugins/Inventor/ConvertToInventor.cpp
--- OpenSceneGraph-2.4.0.orig/src/osgPlugins/Inventor/ConvertToInventor.cpp 2008-04-03 20:36:50.000000000 +0200
+++ OpenSceneGraph-2.4.0/src/osgPlugins/Inventor/ConvertToInventor.cpp 2008-05-11 09:19:25.000000000 +0200
@@ -67,7 +67,9 @@
#include <Inventor/nodes/SoSphere.h>
#include <Inventor/nodes/SoTexture2.h>
#include <Inventor/nodes/SoTextureCoordinate2.h>
+#ifdef __COIN__
#include <Inventor/nodes/SoTextureCoordinate3.h>
+#endif
#include <Inventor/nodes/SoTextureCoordinateEnvironment.h>
#include <Inventor/nodes/SoTransform.h>
#include <Inventor/nodes/SoTranslation.h>
@@ -1228,6 +1230,7 @@
startIndex, n);
}
} else
+#ifdef __COIN__
if (ivTexCoords->isOfType(SoTextureCoordinate3::getClassTypeId())) {
nonIndexedTexCoords = new SoTextureCoordinate3;
if (ok) {
@@ -1239,6 +1242,7 @@
startIndex, n);
}
} else
+#endif
nonIndexedTexCoords = ivTexCoords;
// create alternate normals
@@ -1539,9 +1543,11 @@
if (g->getTexCoordArray(0)->getDataSize() <= 2) {
texCoords = new SoTextureCoordinate2;
osgArray2ivMField(g->getTexCoordArray(0), ((SoTextureCoordinate2*)texCoords)->point);
+#ifdef __COIN__
} else {
texCoords = new SoTextureCoordinate3;
osgArray2ivMField(g->getTexCoordArray(0), ((SoTextureCoordinate3*)texCoords)->point);
+#endif
}
}
if (texCoords)
diff -Naur OpenSceneGraph-2.4.0.orig/src/osgPlugins/Inventor/ConvertToInventor.h OpenSceneGraph-2.4.0/src/osgPlugins/Inventor/ConvertToInventor.h
--- OpenSceneGraph-2.4.0.orig/src/osgPlugins/Inventor/ConvertToInventor.h 2007-09-30 20:33:57.000000000 +0200
+++ OpenSceneGraph-2.4.0/src/osgPlugins/Inventor/ConvertToInventor.h 2008-05-11 09:18:24.000000000 +0200
@@ -85,7 +85,7 @@
bool useIvExtensions;
SoSeparator *ivRoot;
- typedef struct InventorState {
+ struct InventorState {
class SoGroup *ivHead;
class SoTexture2 *ivTexture;
class SoMaterial *ivMaterial;
diff -Naur OpenSceneGraph-2.4.0.orig/src/OpenThreads/pthreads/CMakeLists.txt OpenSceneGraph-2.4.0/src/OpenThreads/pthreads/CMakeLists.txt
--- OpenSceneGraph-2.4.0.orig/src/OpenThreads/pthreads/CMakeLists.txt 2008-04-24 13:34:43.000000000 +0200
+++ OpenSceneGraph-2.4.0/src/OpenThreads/pthreads/CMakeLists.txt 2008-05-13 06:08:54.000000000 +0200
@@ -26,8 +26,8 @@
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${OPENTHREADS_VERSION} SOVERSION ${OPENTHREADS_SOVERSION})
ENDIF(OPENTHREADS_SONAMES)
-SET(CMAKE_REQUIRED_LIBRARIES_SAFE "${CMAKE_REQUIRED_LIBRARIES}")
-SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")
+SET(CMAKE_REQUIRED_LIBRARIES_SAFE ${CMAKE_REQUIRED_LIBRARIES})
+SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
CHECK_FUNCTION_EXISTS(pthread_yield HAVE_PTHREAD_YIELD)
IF(HAVE_PTHREAD_YIELD)
@@ -89,7 +89,7 @@
ENDIF(HAVE_THREE_PARAM_SCHED_SETAFFINITY)
ENDIF(HAVE_PTHREAD_SETAFFINITY_NP)
-SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_SAFE}")
+SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAFE})
TARGET_LINK_LIBRARIES(${LIB_NAME}
${CMAKE_THREAD_LIBS_INIT}