Added first cut of Cmake COLLADA support
This commit is contained in:
parent
3501f0ac0c
commit
0dfd619138
@ -124,6 +124,7 @@ FIND_PACKAGE(Inventor)
|
|||||||
FIND_PACKAGE(Qt3)
|
FIND_PACKAGE(Qt3)
|
||||||
FIND_PACKAGE(Qt4)
|
FIND_PACKAGE(Qt4)
|
||||||
FIND_PACKAGE(Jasper)
|
FIND_PACKAGE(Jasper)
|
||||||
|
FIND_PACKAGE(COLLADA)
|
||||||
|
|
||||||
# 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
|
||||||
|
56
CMakeModules/FindCOLLADA.cmake
Normal file
56
CMakeModules/FindCOLLADA.cmake
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Locate gdal
|
||||||
|
# This module defines
|
||||||
|
# COLLADA_LIBRARY
|
||||||
|
# COLLADA_FOUND, if false, do not try to link to gdal
|
||||||
|
# COLLADA_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $COLLADA_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$COLLADA_DIR
|
||||||
|
#
|
||||||
|
# Created by Robert Osfield.
|
||||||
|
|
||||||
|
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
||||||
|
$ENV{COLLADA_DIR}/include
|
||||||
|
$ENV{COLLADA_DIR}
|
||||||
|
$ENV{OSGDIR}/include
|
||||||
|
$ENV{OSGDIR}
|
||||||
|
$ENV{OSG_ROOT}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||||
|
/usr/freeware/include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_LIBRARY
|
||||||
|
NAMES collada_dom
|
||||||
|
PATHS
|
||||||
|
$ENV{COLLADA_DIR}/lib
|
||||||
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
|
$ENV{COLLADA_DIR}
|
||||||
|
$ENV{OSGDIR}/lib
|
||||||
|
$ENV{OSGDIR}
|
||||||
|
$ENV{OSG_ROOT}/lib
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(COLLADA_FOUND "NO")
|
||||||
|
IF(COLLADA_LIBRARY AND COLLADA_INCLUDE_DIR)
|
||||||
|
SET(COLLADA_FOUND "YES")
|
||||||
|
ENDIF(COLLADA_LIBRARY AND COLLADA_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
@ -93,6 +93,11 @@ IF (BUILD_OSG_3D_PLUGINS)
|
|||||||
ADD_SUBDIRECTORY(vrml)
|
ADD_SUBDIRECTORY(vrml)
|
||||||
ENDIF(VRML_FOUND)
|
ENDIF(VRML_FOUND)
|
||||||
|
|
||||||
|
|
||||||
|
IF(COLLADA_FOUND)
|
||||||
|
ADD_SUBDIRECTORY(dae)
|
||||||
|
ENDIF(COLLADA_FOUND)
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(lwo)
|
ADD_SUBDIRECTORY(lwo)
|
||||||
ADD_SUBDIRECTORY(x)
|
ADD_SUBDIRECTORY(x)
|
||||||
ADD_SUBDIRECTORY(dw)
|
ADD_SUBDIRECTORY(dw)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} )
|
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
||||||
|
|
||||||
SET(TARGET_SRC
|
SET(TARGET_SRC
|
||||||
daeReader.cpp
|
daeReader.cpp
|
||||||
@ -20,7 +20,7 @@ SET(TARGET_H
|
|||||||
domSourceReader.h
|
domSourceReader.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(TARGET_LIBRARIES_VARS COLLADA_LIBRARY )
|
SET(TARGET_LIBRARIES_VARS COLLADA_LIBRARY)
|
||||||
|
|
||||||
#### end var setup ###
|
#### end var setup ###
|
||||||
SETUP_PLUGIN(dae)
|
SETUP_PLUGIN(dae)
|
||||||
|
Loading…
Reference in New Issue
Block a user