sources from http://zlib.net/zlib-1.2.8.tar.gz

extract to c:\code\zlib-1.2.8

mkdir c:\code\zlib-1.2.8\build
cd c:\code\zlib-1.2.8\build
cmake -DCMAKE_INSTALL_PREFIX=C:\CODE\DEPS -DASM686=ON -G "Visual Studio 14 2015" ..
cmake -DCMAKE_ASM_MASM_FLAGS_RELWITHDEBINFO="/W0 /safeseh" .
cmake --build . --target install --config relwithdebinfo

collect artifacts from c:\code\deps

/W0 is to silence errors, default is to die on warnings and the warning is harmless.
/safeseh to allow linking the asm files into the dll linked as safeseh