[CMake] CMake fails to find zlib on OS X Mountain Lion

Alexey Petruchik i100500 at gmail.com
Thu Dec 20 07:14:46 EST 2012


Hi, all. I have a fresh install of OS X Mountain Lion. Xcode installed.
CMake fails to locate zlib headers:

CMake Error at /Applications/CMake
2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
(message):
  Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
  /Applications/CMake
2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291
(_FPHSA_FAILURE_MESSAGE)
  /Applications/CMake
2.8-10.app/Contents/share/cmake-2.8/Modules/FindZLIB.cmake:85
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:42 (find_package)

But they are located at:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include

Any way to tell cmake to look for headers\libraries inside Xcode bundle
without hardcoding this path?

Regards, Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121220/4db5c433/attachment.htm>


More information about the CMake mailing list