s4eed
s4eed

Reputation: 7891

CMake : Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

I'm going to build an open souce chat application named qutim (a Qt based applicatoin) . This application needs ZLib but according to this question this library is included in Qt itself. But when I want to configure it inside cmake I get this error :

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  protocols/jabber/jreen/CMakeLists.txt:75 (find_package)

I even tried to add two environment variables ZLIB_LIBRARY and ZLIB_INCLUDE_DIR but it wasn't helpful. Every suggestion is appriciated!

Upvotes: 5

Views: 25908

Answers (1)

Daniel Chen
Daniel Chen

Reputation: 103

I met the same problem on build libssh for win32. Fix by cmake ..\libssh -DZLIB_INCLUDE_DIR=....\include -DZLIB_LIBRARY=..\lib\lib

hopes it will help you.

Upvotes: 9

Related Questions