How to fix missing ZLIB_LIBRARY
and ZLIB_INCLUDE_DIR
cmake error on Windows
Install ZLIB
Download ZLIB for Windows from Sourceforge and install it on your Windows machine. Works with x86/x64
We learn how to compile and build #zlib on Windows using Visual Studio 2015 and 2017. Download installation script. How to Install & Configure printer, Network Printer - Duration: 36:05.
Find ZLIB install directory
Currently, the ZLIB installer from Sourceforge (above) installs in
C:/Program Files (x86)/GnuWin32
.Setup cmake-gui variables
Run
cmake-gui
to open the cmake gui and choose your source and build directories.Check Abvanced and ckeck if ZLIB_LIBRARY
or ZLIB_INCLUDE_DIR
have entries in the left column.If the entry is not a directory, replace whatever is in the right hand column with the directory you found in step 2 and append /bin
to the end of the ZLIB_LIBRARY
and append /include
to the ZLIB_INCLJDE_DIR
directory.It should look something like this.Hope this helps!