From Philip Lowman, added support for Inventor

This commit is contained in:
Robert Osfield 2007-03-20 09:50:24 +00:00
parent 7039ff4af4
commit 33817a7e5d
4 changed files with 71 additions and 4 deletions

View File

@ -46,7 +46,9 @@ ELSE(USING_OSG_OP_OT_TRIPLE_SET)
# MESSAGE("OSG: Not using Triple Set") # MESSAGE("OSG: Not using Triple Set")
FIND_PACKAGE(OpenThreads REQUIRED) FIND_PACKAGE(OpenThreads REQUIRED)
ENDIF(USING_OSG_OP_OT_TRIPLE_SET)# Find OpenGL ENDIF(USING_OSG_OP_OT_TRIPLE_SET)
# Find OpenGL
FIND_PACKAGE(OpenGL) FIND_PACKAGE(OpenGL)
IF(APPLE) IF(APPLE)
@ -107,6 +109,8 @@ ENDIF(WIN32)
# Common to all platforms: # Common to all platforms:
FIND_PACKAGE(FreeType) FIND_PACKAGE(FreeType)
# Common to all platforms:
FIND_PACKAGE(Inventor)
# Platform specific: # Platform specific:
# (We can approach this one of two ways. We can try to FIND everything # (We can approach this one of two ways. We can try to FIND everything
@ -138,8 +142,6 @@ ELSE(NOT APPLE)
ENDIF(NOT APPLE) ENDIF(NOT APPLE)
################################################################################ ################################################################################
# Installation stuff # Installation stuff

View File

@ -0,0 +1,43 @@
# - Locate Inventor
# This module defines:
# INVENTOR_FOUND, if false, do not try to link against Inventor.
# INVENTOR_LIBRARY, the library to link against.
# INVENTOR_INCLUDE_DIR, where to find headers.
FIND_PATH(INVENTOR_INCLUDE_DIR Inventor/So.h
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
)
FIND_LIBRARY(INVENTOR_LIBRARY
NAMES Coin
PATHS
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
)
IF(NOT INVENTOR_LIBRARY)
# If we can't find libCoin try libInventor
FIND_LIBRARY(INVENTOR_LIBRARY
NAMES Inventor
PATHS
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
)
ENDIF(NOT INVENTOR_LIBRARY)
SET(INVENTOR_FOUND "NO")
IF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)
SET(INVENTOR_FOUND "YES")
ENDIF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)

View File

@ -80,7 +80,9 @@ ENDIF (BUILD_OSG_IMAGE_PLUGINS)
IF (BUILD_OSG_3D_PLUGINS) IF (BUILD_OSG_3D_PLUGINS)
SET(TARGET_DEFAULT_LABEL_PREFIX "Plug 3d") SET(TARGET_DEFAULT_LABEL_PREFIX "Plug 3d")
ADD_SUBDIRECTORY(3dc) ADD_SUBDIRECTORY(3dc)
#ADD_SUBDIRECTORY(Inventor) IF(INVENTOR_FOUND)
ADD_SUBDIRECTORY(Inventor)
ENDIF(INVENTOR_FOUND)
#ADD_SUBDIRECTORY(lwo) #ADD_SUBDIRECTORY(lwo)
ADD_SUBDIRECTORY(x) ADD_SUBDIRECTORY(x)
ADD_SUBDIRECTORY(dw) ADD_SUBDIRECTORY(dw)

View File

@ -0,0 +1,20 @@
INCLUDE(OsgMacroUtils)
SET(TARGET_SRC
ConvertFromInventor.cpp
GroupSoLOD.cpp
PendulumCallback.cpp
ReaderWriterIV.cpp
ShuttleCallback.cpp
)
SET(TARGET_HDRS
ConvertFromInventor.h
GroupSoLOD.h
PendulumCallback.h
ReaderWriterIV.h
ShuttleCallback.h
)
SET(TARGET_EXTERNAL_LIBRARIES ${INVENTOR_LIBRARY} )
SETUP_PLUGIN(iv)