List Archive


Thread Index


From: "Lubomir I. Ivanov" <>
To: Andreas Falkenhahn <>
Subject: Re: Setting zlib path when compiling on Windows
Date: Tue, 3 Oct 2017 01:01:42 +0300

On 3 October 2017 at 00:34, Andreas Falkenhahn 
<> wrote:
> On 02.10.2017 at 23:27 Thomas Klausner wrote:
>> When I run it locally (just 'cmake ..', and on NetBSD, not Linux) I get
>> ZLIB_INCLUDE_DIR:PATH=/usr/include
>> in my CMakeCache.txt file. So it seems that ZLIB_LIBRARY might have to
>> point to the actual library and not a directory.
> Keep in mind that I'm on Windows. This is the actual problem here :)
> Of course on Linux and Mac zlib is already installed but on Windows
> I need to point CMake to zlib explicitly. But currently I'm failing
> to see how to do that as all my approaches have failed so far.
> Your suggestion of setting ZLIB_LIBRARY to the actual library
> instead of a directory also doesn't help because I aim to link
> statically against both libzip and zlib so all libzip should
> actually need is access to the zlib headers but I don't see
> how to pass that path to CMake...

hi Andreas,

here is my command line for building libzip on Windows (dynamic link
to zlib, though).
cmake -G "MinGW Makefiles" -DZLIB_INCLUDE_DIR=c:\lib\zlib

note that i generate mingw files and also that i use Windows paths (with "\").
would that help or are you using a different toolchain?


Made by MHonArc.