Luigi Calori wrote:
Hi, I' ve been mostly offline for the last 3days, I did not personally
test 2.6 yet (I' m willing to do soon) but do not think putting a .lib
extension would harm windows builds.
I personally do not remember having set up this ide special case, but
probably 2.4 was more tolerant than 2.6 on not specifying extension in
linking with library already built in the same solution.
I' m not a cmake guru, so other (Bill) could explain.
As far as I' m concerned, no problem in adding .lib, go ahead with the
patch.
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.
For example:
add_library(foo foo.c)
add_executable(bar bar.c)
target_link_libraries(bar foo)
That is all you should need. CMake should take care of prefix and
postfix stuff for foo.
Also, if it is a library that CMake did not build, and external library,
then the best thing to do is to use a full path to the library.
target_link_libraries(bar /full/path/to/foo.lib)
If that is not a possibility then it can be done like this:
link_directories(/full/path/to)
target_link_libraries(bar foo)
Note, that foo does not need the .lib and CMake will add it.
-Bill
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org