我要构建一个名为qutim的开放源聊天应用程序(基于Qt的应用程序)。此应用程序需要ZLib,但根据this question,此库包含在Qt本身中。但是当我想在cmake中配置它时,我得到了这个错误:
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)
我甚至尝试添加两个环境变量ZLIB_LIBRARY和ZLIB_INCLUDE_DIR,但它没有帮助。 每个建议都很贴切!
答案 0 :(得分:7)
我在构建libssh for win32时遇到了同样的问题。修复cmake .. \ libssh -DZLIB_INCLUDE_DIR = .... \ include -DZLIB_LIBRARY = .. \ lib \ lib
希望它会对你有所帮助。