root/OpenSceneGraph/trunk/src/osgPlugins/dae/CMakeLists.txt @ 10234

Revision 10234, 2.0 kB (checked in by robert, 5 years ago)

From Roland Smeenk, "Attached you will find some changes to the dae plugin to improve light support.

-Changed the addition of lights to add the lightsource directly into the scenegraph (instead of below a switch node)
-All added lights are enabled in the root stateset and replace the head- or skylight.

(if no lights are available the head- or skylight will remain active)

-Ambient in osg::LightModel? is zeroed out. All ambient now comes from separate ambient only light sources.
-Lights can now be written properly
-Replaced strings by constants defined in the Collada DOM"

  • Property svn:eol-style set to native
RevLine 
[9751]1IF (WIN32)
2    INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4 ${COLLADA_BOOST_INCLUDE_DIR} )
[9998]3ELSE ()
[9751]4    INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
[9998]5ENDIF ()
[6605]6
7SET(TARGET_SRC
8    daeReader.cpp
9    daeRGeometry.cpp
10    daeRMaterials.cpp
11    daeRSceneObjects.cpp
12    daeRTransforms.cpp
13    daeWGeometry.cpp
14    daeWMaterials.cpp
15    daeWriter.cpp
16    daeWSceneObjects.cpp
17    daeWTransforms.cpp
18    domSourceReader.cpp
19    ReaderWriterDAE.cpp
20)
[7627]21
[6605]22SET(TARGET_H
23    daeReader.h
24    daeWriter.h
25    domSourceReader.h
[9953]26    ReaderWriterDAE.h
[6605]27)
[7627]28
29
[9998]30IF(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY)
[9307]31    OPTION(COLLADA_USE_STATIC "Set to ON to build OpenSceneGraph with static Collada support." OFF)
[9998]32ELSEIF(COLLADA_STATIC_LIBRARY)
33    SET(COLLADA_USE_STATIC "YES")
34ELSE()
35    SET(COLLADA_USE_STATIC "NO")
36ENDIF()
[9307]37
[9998]38IF(COLLADA_USE_STATIC)
[9741]39    IF(WIN32)
[9751]40        ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
[9998]41        SET(TARGET_LIBRARIES_VARS
42            COLLADA_STATIC_LIBRARY
43            COLLADA_LIBXML_LIBRARY
44            COLLADA_ZLIB_LIBRARY
45            COLLADA_PCRECPP_LIBRARY
46            COLLADA_PCRE_LIBRARY
47            COLLADA_MINIZIP_LIBRARY
48            COLLADA_BOOST_FILESYSTEM_LIBRARY
49            COLLADA_BOOST_SYSTEM_LIBRARY)
50    ELSE()
51        SET(TARGET_LIBRARIES_VARS
52            COLLADA_STATIC_LIBRARY
53            COLLADA_LIBXML_LIBRARY
54            COLLADA_PCRECPP_LIBRARY
[10234]55            COLLADA_PCRE_LIBRARY
[9998]56            COLLADA_BOOST_FILESYSTEM_LIBRARY
57            COLLADA_BOOST_SYSTEM_LIBRARY)   
58    ENDIF()
59ELSE()
[9741]60    IF(WIN32)
[9751]61        ADD_DEFINITIONS(-DDOM_DYNAMIC -DBOOST_ALL_NO_LIB)
[9998]62        SET(TARGET_LIBRARIES_VARS
63            COLLADA_DYNAMIC_LIBRARY
64            COLLADA_BOOST_SYSTEM_LIBRARY)
65    ELSE()
66        SET(TARGET_LIBRARIES_VARS
[10234]67            COLLADA_PCRECPP_LIBRARY
68            COLLADA_PCRE_LIBRARY
69            COLLADA_DYNAMIC_LIBRARY
70            COLLADA_BOOST_FILESYSTEM_LIBRARY
71            COLLADA_BOOST_SYSTEM_LIBRARY)
[9998]72    ENDIF()
73ENDIF()
[9307]74 
[9228]75SET(TARGET_ADDED_LIBRARIES osgSim )
[6605]76
77#### end var setup  ###
[9339]78SETUP_PLUGIN(dae dae)
Note: See TracBrowser for help on using the browser.