summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-06-26 18:48:01 -0700
committerGuy Harris <guy@alum.mit.edu>2017-06-27 03:16:25 +0000
commitfc9a7df426589b1311df1fc2912ab39f9efd5ac9 (patch)
tree724e8ba452e7007e9a4c7372d46b16a7b106efdf
parenta3ff8f8b2870c8814ef69e811ce7a18e1f631427 (diff)
downloadwireshark-fc9a7df426589b1311df1fc2912ab39f9efd5ac9.tar.gz
Don't check for inflatePrime() on Windows.
On Windows, we build libz as part of the Wireshark build process, so we don't necessarily *have* a libz library to search or inflatePrime() at this point; the search fails on the buildbots, for example. So, on Windows, we just assume we have a new enough version of libz, so that it has inflatePrime(). Bug: 13850 Change-Id: Ied0909f4a591ff3312d83a2a2ed41e3cd12218e8 Reviewed-on: https://code.wireshark.org/review/22413 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu> (cherry picked from commit 9a1d16b55324056e4d5031370b007097b76dc519) Reviewed-on: https://code.wireshark.org/review/22414
-rw-r--r--cmake/modules/FindZLIB.cmake24
1 files changed, 19 insertions, 5 deletions
diff --git a/cmake/modules/FindZLIB.cmake b/cmake/modules/FindZLIB.cmake
index 212867e769..ac4259b984 100644
--- a/cmake/modules/FindZLIB.cmake
+++ b/cmake/modules/FindZLIB.cmake
@@ -87,11 +87,25 @@ IF(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
SET(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
ENDIF()
-INCLUDE(CheckFunctionExists)
-SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARY})
-CHECK_FUNCTION_EXISTS("inflatePrime" HAVE_INFLATEPRIME)
-# reset
-SET(CMAKE_REQUIRED_LIBRARIES "")
+#
+# Sigh. On Windows, we build libz as part of the Wireshark build
+# process, so we don't necessarily *have* a libz library to search
+# for inflatePrime() at this point; the search fails on the buildbots,
+# for example. See bug 13850.
+#
+# So, on Windows, we just assume we have a new enough version of
+# libz, so that it has inflatePrime().
+#
+IF(WIN32)
+ MESSAGE(STATUS "Zlib might not be built yet; assume it contains inflatePrime")
+ SET(HAVE_INFLATEPRIME ON)
+ELSE()
+ INCLUDE(CheckFunctionExists)
+ SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARY})
+ CHECK_FUNCTION_EXISTS("inflatePrime" HAVE_INFLATEPRIME)
+ # reset
+ SET(CMAKE_REQUIRED_LIBRARIES "")
+ENDIF()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE