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:04 +0000
commit9a1d16b55324056e4d5031370b007097b76dc519 (patch)
tree649b09e29bd1f49ea39e8dd23d7ada5f1f54c01d
parent4eacd57690222584839024f77111f9dfb886a3e6 (diff)
downloadwireshark-9a1d16b55324056e4d5031370b007097b76dc519.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>
-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