Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

zlib

qt

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!

like image 721
s4eed Avatar asked Apr 30 '14 05:04

s4eed


1 Answers

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.

like image 163
Daniel Chen Avatar answered Sep 19 '22 07:09

Daniel Chen