On Fri, May 30, 2008 at 12:03 PM, Jean-Sébastien Guay <
[EMAIL PROTECTED]> wrote:

> Hi all,
>
>  Now merged, thanks guys!
>>
>
> Philip, any chance you could work that CMake 2.6 magic you did on OSG into
> the VPB CMakeLists.txt files? It has the same CMP0003 problem OSG had, and
> same symptoms on building (libs don't have an extension, so Visual C++
> thinks they're .obj files).


I've never built VPB before so it probably would be best to leave this to
someone more familiar with the software.  Also, I'm on vacation and away
from my typical dev environment anyways.  Honestly the changes I submitted
to Robert to make OSG work on CMake 2.6.x were relatively minor, nothing
magic about them. =)

Regarding the "OBJ" linking problem...

I'm pretty sure that those weird calls that are being made to
TARGET_LINK_LIBRARIES() causing those problems you cited can simply go away,
even on CMake 2.4.x.  I think that the reason they were put there in the
first place was because one of the original designers of the OSG's build
system wanted to support independent building and linking of OpenThreads,
OSG, and Producer but without them being built all together with CMake and
generated as internal targets.  I think he was trying to make them depend on
each other externally as separate projects, or at least have that option
available.

For internally generated targets, no matter if they are generated by Visual
Studio or by the Makefile generator all that you should have to do to link
targets is call:

TARGET_LINK_LIBRARIES(foo mylib1 mylib2)
# where mylib1 and mylib2 are static or shared libraries created by
ADD_LIBRARY()
# and foo is the executable or library target you're linking against mylib1
& mylib2

The only reason you should have to call TARGET_LINK_LIBRARIES() and use the
"optimized" or "debug" flags is if you're linking against external
dependencies.  When doing this you almost always want to use FIND_LIBRARY()
to locate the import library to use.

-- 
Philip Lowman
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to