Roger,
Thanks for your help, I was able to get it to link correctly under the
MAC. Here is what I did:
Index: src/osgPlugins/dae/CMakeLists.txt
===================================================================
--- src/osgPlugins/dae/CMakeLists.txt (revision 9676)
+++ src/osgPlugins/dae/CMakeLists.txt (working copy)
@@ -45,9 +45,9 @@
#
# ...so what we need is a conditional way to properly SET() the
right one.
IF(COLLADA_USE_STATIC)
- SET(TARGET_EXTERNAL_LIBRARIES collada14dom xml2 pcrecpp)
+ SET(TARGET_EXTERNAL_LIBRARIES collada14dom xml2 pcrecpp $
{Boost_SYSTEM_LIBRARY})
ELSE(COLLADA_USE_STATIC)
- SET(TARGET_EXTERNAL_LIBRARIES collada14dom xml2)
+ SET(TARGET_EXTERNAL_LIBRARIES collada14dom xml2 $
{Boost_SYSTEM_LIBRARY})
ENDIF(COLLADA_USE_STATIC)
ENDIF(WIN32)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 9676)
+++ CMakeLists.txt (working copy)
@@ -619,3 +619,7 @@
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/
cmake_uninstall.cmake")
+#fix for collada
+ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
+FIND_PACKAGE( Boost 1.36 COMPONENTS system )
+
Matt
On Feb 6, 2009, at 11:24 AM, Roger James wrote:
alessandro terenzi wrote:
Roger,
are there also some changes that we should make to build collada
plugin on Mac?
I'm experiencing some problem when building collada plugin on Mac
OS X (10.5). I'm quite new to Mac's developinng environment (as
well as Unix and Linux), so maybe it is my fault and I apologize if
I make silly questions, anyway here is what I did:
1) I built Collada DOM 2.2 (resulting in Collada14Dom.dylib)
2) I set OSG's cmake parameters for COLLADA in order to point to
the just built Collada14Dom.dylib and to Collada DOM's headers too
3) I tried to build OSG using Xcode project as generated by cmake,
but building failed
So, I manually added the path to boost headers (that was a problem)
and compiling was successful, but linking failed becuase it looks
like that the collada lib is still not found (even though I also
added the path to Collada14Dom.dylib).
Please can you tell me if there are some steps to follow in order
to build dae plugin against DOM 2.2? By the way I'm using OSG 2.7.9?
Thanks.
Alessandro
On Fri, Feb 6, 2009 at 2:10 PM, Roger James <ro...@beardandsandals.co.uk
> wrote:
Matt Fair wrote:
I am trying to get collada compiled into OSG and am having some
trouble. It looks like collada-dom comes with boost and
statically links to it, I have another version of boost on my
system also, but how the make files are setup it is using the
provided copy. When I compile OSG I get:
Matt,
To build against 2.2 on Windows I had to mod the CMake generated
build files as follows:-
1. Added a path for boost to the additional include directories.
2. Added BOOST_ALL_NO_LIB to the preprocessor defines.
3. Added a path for boost to the linker additional library
directories.
4. Added libboost_system-d.lib to the linker additional dependencies.
However you can still build against https://collada-dom.svn.sourceforge.net/svnroot/collada-dom/tags/2.1/dom
without making any changes.
I suppose these changes should realy go into CMake, but I find
CMake somewhat opaque :-)
Roger
Alessandro,
I suspect you will have to make similar changes to the Xcode build
files to successfully link against the Collada DOM api version 2.2.
However there is really not much to gain from linking against this
version rather than the 2.1 version.
Roger
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org