List Archive


Thread Index


From: Andreas Falkenhahn <>
To: libzip mailing list <>
Subject: Setting zlib path when compiling on Windows
Date: Mon, 2 Oct 2017 22:51:25 +0200

I'm trying to compile libzip on Windows using CMake to generate
makefiles. Libzip needs zlib so I'm doing the following:

        mkdir build
        cd build
        cmake -DZLIB_LIBRARY=../../../zlib-1.2.11 
-DZLIB_INCLUDE_DIR=../../../zlib-1.2.11 ..

This doesn't work, however. I get the following error:

        CMake Error at C:/Program Files 
        Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

Why is that? I have defined ZLIB_LIBRARY and ZLIB_INCLUDE_DIR to point
to the latest zlib.

I've also tried the following:

        mkdir build
        cd build
        cmake .. -DZLIB_LIBRARY=../../../zlib-1.2.11 

When I run CMake like this, I get the following two warnings:

        CMake Warning:
        Manually-specified variables were not used by the project:

In comparison to the first approach, however, build files are now written to my 
directory. When running nmake, however, only zlib seems to get built. libzip 
isn't built at all.

I'm out of ideas here. What am I doing wrong?

Best regards,
 Andreas Falkenhahn                 

Made by MHonArc.