Hi Philip, all, I'm moving this discussion to osg-users. For references see
http://www.mail-archive.com/[EMAIL PROTECTED]/msg01780.html On 8/22/08, Philip Lowman <[EMAIL PROTECTED]> wrote: > Grrrr... > > Ok, so the whole section from lines 27 to 42 can, I'm nearly 100% certain, > can safely be replaced by one line: > TARGET_LINK_LIBRARIES(${TRGTNAME} ${ARGN}) That would be nice and would leave that macro with one line, however it doesn't work with my cmake-2.4.8 becasue of its problem with the lib/dll name asymmetry (osg45-osg.dll and osg.lib), so until we drop support for cmake-2.4 we need some of that code. (Correct me if I'm wrong, I'd really like to see that macro shortened to one line :) > I believe all of the complication in this section is due to an obscure > use-case conceived by the original designers of the OSG adaption to CMake > which is no longer relevant. > > The simple fact of the matter is CMake automatically handles linking > internally generated debug targets against internally generated debug > libraries (and same for release) and has done so since at least CMake 2.4.0, > probably before that. > > I'd be confident sending this change to osg-submissions if I knew how to > regression test the NOT MSVC_IDE use case. I wonder if this means building > the OSG with nmake or some other command line build? Perhaps someone on > here more familiar with the VS tools could use the attached file on CMake > 2.4.8 and see if NMake causes MSVC_IDE to be false and see if everything > builds fine? > > Alternatively, we could simply submit the fix and handle any repercussions > later. If TARGET_LINK_LIBRARIES(${TRGTNAME} ${ARGN}) doesn't work it is > most definitely a CMake bug. > > A less risky fix to elliminate the warning would be to append ".lib" to line > 36 and collapse that conditional block. This is what I have done and attached. It works on my available configurations, removes a few redundant lines and won't require that cmake_policy setting in the top-level CMakeLists.txt. Tested on winxp with msvc7.1, 8.0, 9.0 and cmake-2.4.8/2.6.1. Also tested to build with nmake generators. As a side note, without having digged this out I've been wondering what the OSG_MSVC_VERSIONED_DLL do that OSG_USE_SONAMES don't? I am prepared to get bitch-slapped here but if it is redundant we should remove it for easier maintenance. cheers Mattias > > -- > Philip Lowman >
OsgMacroUtils.cmake
Description: Binary data
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

