Hi Nick...

Yes, we've had some trouble getting this to work as well...

Not with the includes perhaps, pointing to the include directory in
COLLADA_DOM should be sufficient?

But getting the linking to work well with all the dependencies was a lot
more bothersome... I ended up with compiling the COLLADA_DOM myself (easy
enough) and using
    ADD_DEFINITIONS(-DDOM_DYNAMIC)
in the collada-plugin to use the dynamically linked version... I could then
remove the rows setting TARGET_EXTERNAL_LIBRARIES and pointing out
libcollada141dom13.lib from COLLADA_DOM...

Also, it might be relevant that I had trouble getting
TARGET_EXTERNAL_LIBRARIES to work later when writing another plugin... I
changed it to add the library to both optimized and debug specifically
instead of specifying none and then it worked... Not sure if the
collada-plugin would have worked if I had done this change before instead...

Modified files attached...

/Daniel

On 8/30/07, Nick Prudent <[EMAIL PROTECTED]> wrote:
>
>
> I've used Collada-DOM before for another project but for some reason
> cannot seem to provide the correct include directories for building the
> COLLADA plugin. I develop on Windows.
>
>
> Does OSG expect any special directory structure or environment variable?
> What parameters should be put in CMake to make this work?
>
> Thanks,
>
> - Nick -
>
>
>
>
> _________________________________________________________________
> News, entertainment and everything you care about at Live.com. Get it now!
> http://www.live.com/getstarted.aspx
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} )

SET(TARGET_SRC
    daeReader.cpp
    daeRGeometry.cpp
    daeRMaterials.cpp
    daeRSceneObjects.cpp
    daeRTransforms.cpp
    daeWGeometry.cpp
    daeWMaterials.cpp
    daeWriter.cpp
    daeWSceneObjects.cpp
    daeWTransforms.cpp
    domSourceReader.cpp
    ReaderWriterDAE.cpp
)
SET(TARGET_H 
    daeReader.h
    daeWriter.h
    domSourceReader.h
)
IF(WIN32)
    ADD_DEFINITIONS(-DDOM_DYNAMIC)
    # SET(TARGET_EXTERNAL_LIBRARIES libcollada141dom13 )
    #    SET(TARGET_EXTERNAL_LIBRARIES libcollada141dom13 libcollada_dae 
libcollada_STLDatabase libcollada_LIBXMLPlugin libcollada_stdErrPlugin libxml2 )
ELSE(WIN32)
    #SET(TARGET_EXTERNAL_LIBRARIES collada_dom collada_dae collada_STLDatabase 
collada_LIBXMLPlugin collada_stdErrPlugin xml2 )
    # JC hack STLDatabase and XMLPlugin are statically linked on Linux
    SET(TARGET_EXTERNAL_LIBRARIES collada_dom collada_dae xml2 )
ENDIF(WIN32)
SET(TARGET_LIBRARIES_VARS COLLADA_LIBRARY)

#### end var setup  ###
SETUP_PLUGIN(dae)

Attachment: OsgMacroUtils.cmake
Description: Binary data

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to