Jean-Sébastien Guay wrote:
Hi Bill,
You should not have to add .lib, CMake should do that for you. If
these are libraries that CMake is building as part of the OSG build,
then you should only be linking to the target name, and not messing
around with low level .lib type of stuff.
That's what we were doing, and it worked for CMake 2.4.x, but as I said,
CMake 2.6 seems to add just <libname> to the Additional Dependencies in
the generated VS projects (without .lib).
Also, another user added a workaround for nmake builds - the .lib did
not seem to be added there either, even in CMake 2.4.x.
Are these bugs? Can you perhaps download the source tree and try to
generate a VS project, and see if the Additional Dependencies in the
generated project files are correct on your side?
We have no CMake experts in this project, we're just trying to get
something that works...
In the simple case, I just tested with 2.4.8 and 2.6.0 this works fine:
add_executable(bar foo.c)
target_link_libraries(bar foo)
foo.lib is linked for both vs IDE and makefiles.
Let's go back to the macro LINK_INTERNAL. I think the issue was trying
to get around a bug in 2.4.7. That should all be fixed in 2.4.8.
So, I think you don't need the macro at all for 2.4.8 and greater.
It should just be:
target_link_libraries(osgDB osg OpenThreads)
Are all the input libraries to LINK_INTERNAL things that CMake is building?
-Bill
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org