- Setting zlib path when compiling on Windows, Andreas Falkenhahn (2017/10/02 21:21:46)
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 (x86)/CMake/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message): 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 -DZLIB_INCLUDE_DIR=../../../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: ZLIB_INCLUDE_DIR ZLIB_LIBRARY In comparison to the first approach, however, build files are now written to my build directory. When running nmake, however, only zlib seems to get built. libzip itself isn't built at all. I'm out of ideas here. What am I doing wrong? -- Best regards, Andreas Falkenhahn mailto:andreas%falkenhahn.com@localhost
Made by MHonArc.