ivansafrin/Polycode — pull request #88 by mcclure (2012-01-14 21:28:02+00:00)
Title: Mac, Linux build broken because of ZLIB_LIBRARIES

After some recent commit, I believe d362e3dea1e5 which added CMake/FindPNG.cmake, the Linux and Mac builds of the Player, the 2DPhysics module, and the 3DPhysics module all stopped working for me. (Base Polycode continued working). In both cases, the problem was that zlib was not being included at the link stage, and the fix was the fix below: go into the CMakeLists files, and whenever PNG_LIBRARIES appears, add ZLIB_LIBRARIES after it. This ZLIB_LIBRARIES was not necessary before but seems to be now. Notice: I have not tested with MSVC and my patch below does not attempt to touch the CMake paths where MSVC is true, I am building my Windows builds through alternate means (see my Mingw pull request).