Commit cc981d32 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix CMake script to search for zlib.

parent 07d92908
...@@ -26,10 +26,6 @@ ...@@ -26,10 +26,6 @@
# ZLIB_INCLUDE_DIRS - the zlib include directory # ZLIB_INCLUDE_DIRS - the zlib include directory
# ZLIB_LIBRARIES - The libraries needed to use zlib # ZLIB_LIBRARIES - The libraries needed to use zlib
set(_ZLIB_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(ZLIB_INCLUDE_DIRS find_path(ZLIB_INCLUDE_DIRS
NAMES zlib.h NAMES zlib.h
HINTS _ZLIB_ROOT_PATHS HINTS _ZLIB_ROOT_PATHS
...@@ -41,20 +37,13 @@ if(ZLIB_INCLUDE_DIRS) ...@@ -41,20 +37,13 @@ if(ZLIB_INCLUDE_DIRS)
endif() endif()
if(ENABLE_STATIC) if(ENABLE_STATIC)
if(IOS OR QNX)
set(_ZLIB_STATIC_NAMES z)
else()
set(_ZLIB_STATIC_NAMES zstatic zlibstatic zlibstaticd)
endif()
find_library(ZLIB_LIBRARIES find_library(ZLIB_LIBRARIES
NAMES ${_ZLIB_STATIC_NAMES} NAMES zstatic zlibstatic zlibstaticd z
HINTS ${_ZLIB_ROOT_PATHS}
PATH_SUFFIXES bin lib PATH_SUFFIXES bin lib
) )
else() else()
find_library(ZLIB_LIBRARIES find_library(ZLIB_LIBRARIES
NAMES z zlib zlibd NAMES z zlib zlibd
HINTS ${_ZLIB_ROOT_PATHS}
PATH_SUFFIXES bin lib PATH_SUFFIXES bin lib
) )
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment