[linux]cmake:Could NOT find ZLIB

2016-8-10 写技术

$cmake ..
-- CMAKE_TOOLCHAIN_FILE=''
fatal: Not a git repository (or any of the parent directories): .git
Git commit hash: nicholas@ubuntu-
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.3.4")
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:728 (find_package)
-- Configuring incomplete, errors occurred!

Solution:
$cmake .. -DZLIB_INCLUDE_DIR=/usr/include -DZLIB_LIBRARY=/usr/lib

标签: linux

发表评论:

Powered by anycle 湘ICP备15001973号-1