Can't compile libpng 1.6 on windows via cmake: Cannot open include file: 'zlib.h': No such file or directory
问题 VS 2015 Update 1. Prebuilt zlib is extracted into project/zlib. find_package finds it alright with proper vars supplied. It adds the dir as include in cl invocation: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /IC:\project\zlib\include /IC:\project\libpng /nologo /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D _CRT_SECURE_NO_DEPRECATE /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"png16_static.dir