Hi Wang Rui,

I've merged the changes as it, but just commenting something out, for
recent VS versions, that was previously required makes me a bit
nervous.  It looks like older version of VS will work fine, but the
change makes me wonder if everything under VS 2010 will still work
fully.  Have you been able to build the whole OSG, install it and
generate packages for it?

Cheers,
Robert.

On Tue, Apr 20, 2010 at 2:09 PM, Wang Rui <[email protected]> wrote:
> Hi Robert,
>
> The OSG book I'm working on will focus on helping beginners build
> latest OSG source code with Visual Studio 2010 express, without
> setting too many options and without facing unexpected errors. But at
> present, the compilation process will fail because the INSTALL project
> 'cannot find' generated DLLs while copying files. I have looked into
> the build directory and found that the places of generated file
> folders were just different from previous VS versions. In this case,
> the old hack in OsgMacroUtils.cmake may become invalid:
>
> MACRO(HANDLE_MSVC_DLL)
>        #this is a hack... the build place is set to lib/<debug or
> release> by LIBARARY_OUTPUT_PATH equal to OUTPUT_LIBDIR
>        #the .lib will be crated in ../ so going straight in lib by
> the IMPORT_PREFIX property
>        #because we want dll placed in OUTPUT_BINDIR ie the bin folder
> sibling of lib, we can use ../../bin to go there,
>        ...
>        ELSE(NOT MSVC_IDE)
>            SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
> "../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
>        ENDIF(NOT MSVC_IDE)
> ENDMACRO(HANDLE_MSVC_DLL)
>
> Here the prefix "../../bin" may need to be fixed. I just modified it to:
>
> IF(MSVC_VERSION LESS 1600)
>     SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
> "../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
> ENDIF()
>
> It should keep compatible with old MSVC versions. There are similar
> fixes in the SETUP_PLUGIN and SETUP_EXE macros. I haven't tested them
> on more platforms.
>
> Thanks, and take good care of yourself no matter how busy the
> submissions work is. :)
>
> Wang Rui
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to