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

Leif Walsh leif.walsh at gmail.com
Thu Dec 20 07:32:07 EST 2012


I was able to deal with this by modifying the environment variable CPATH. Let me know if you find something better. 

Sent from my iPhone

On Dec 20, 2012, at 7:14, Alexey Petruchik <i100500 at gmail.com> wrote:

> 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
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list