Hi J-S,
Good to know someone is taking this on, thanks! This CMake warning can be
fixed as described in the message - and the default (CMP0003 OLD) seems to
be working ok.
Just out of curiosity, if you have subscribed to the osg-users via daily
digest, how are you supposed to answer to posts without deleting the rest
and changing the subject manually?
Thanks,
Thomas
------------------------------
Date: Thu, 08 May 2008 09:16:09 -0400
From: Jean-S?bastien Guay <[EMAIL PROTECTED]>
Subject: Re: [osg-users] OSG 2.4, CMake 2.6 and Visual C++ 2008:
Missing .lib extension for internal dependencies causes linker
error
To: OpenSceneGraph Users <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hello Thomas,
> Could anyone let me know if this is likely a misconfiguration of mine or
if
> this really is a bug that should be addressed/fixed in the next release of
> the OSG library?
I reported this about a week before the 2.4.0 stable release, but CMake
2.6 was not officially released yet, so we agreed to shelve the issue
and just use CMake 2.4.x to build on Windows until CMake 2.6 was
officially released.
Now that it is, we need to fix this issue. There are a few issues that
using Cmake 2.6.x+ brings up, and this one (the missing .lib extension)
is just one of them (the most apparent, because it breaks things).
To get you up and running, I will point out these lines in
OpenSceneGraph/CMakeModules/OsgMacroUtils.cmake :
IF(NOT MSVC_IDE)
TARGET_LINK_LIBRARIES(${TRGTNAME}
optimized "${OUTPUT_LIBDIR}/${LINKLIB}.lib"
debug "${OUTPUT_LIBDIR}/${LINKLIB}${CMAKE_DEBUG_POSTFIX}.lib")
ELSE(NOT MSVC_IDE)
TARGET_LINK_LIBRARIES(${TRGTNAME}
optimized "${OUTPUT_LIBDIR}/${LINKLIB}"
debug "${OUTPUT_LIBDIR}/${LINKLIB}${CMAKE_DEBUG_POSTFIX}")
ENDIF(NOT MSVC_IDE)
Essentially, as I understand it, this says:
if ( we're *not* building on MSVC)
the lib to be linked should have a .lib extension
else // hence, we *are* building on MSVC
the lib to be linked should *not* have a .lib extension
endif
Why is that? And why did it work when using CMake 2.4.x but not using
CMake 2.6.x+?
Removing these lines and regenerating your build files should get you
building correctly.
I'll test a bit more at home tonight and see what other issues come up.
Perhaps you could post back to the list if you encounter other issues.
One of those I know of is that CMake might pop up a dialog saying that
some new policy is enabled, and how to disable it... Not sure if that
has any implications on the actual build though.
Good luck,
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org