[osg-users] [build] Proper CMAKE settings for ZLIB, bogus "optimized.lib" in link

Andrew Cunningham andrewC at mac.com
Wed Nov 2 14:05:04 PDT 2016


Hi,
I am trying to build OSG 3.4.0 on Windows/Visual Studio 2015 using CMake to generate the projects.

 Everything works pretty well except the confusing settings for ZLIB_LIBRARY, ZLIB_LIBRARY_DEBUG,ZLIB_LIBRARY_RELEASE. Why 3 settings ?

I included paths to Debug and Release builds of ZLib,  in the ZLIB_LIBRARY_DEBUG and ZLIB_LIBRARY_RELEASE respectively and left ZLIB_LIBRARY blank. 

Although the DEBUG build is ok , my RELEASE builds ended up with library references to non-existent "optimized.lib" and "debug.lib"  as well as duplicating the debug and release versions of the zlib libraries.

For example, this is pasted from the VS linker settings for and OSG project.
....-
optimized.lib
D:\OSG\3rdParty\build\lib\Release\zlib.lib
debug.lib
D:\OSG\3rdParty\build\lib\Debug\zlibd.lib
....

Andrew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69206#69206








More information about the osg-users mailing list