summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-01-03 23:32:35 (GMT)
committerBrad King <brad.king@kitware.com>2012-01-03 23:34:19 (GMT)
commit6781a099406d7864f21ccbbf11c1995f8700b159 (patch)
treeb70ce0ac1e6d27c73efb758da75aac24b7a6bdd1 /Utilities/cmlibarchive/CMakeLists.txt
parentf15d75760f2041b43f25a6a0b83b59908acf8781 (diff)
downloadCMake-6781a099406d7864f21ccbbf11c1995f8700b159.zip
CMake-6781a099406d7864f21ccbbf11c1995f8700b159.tar.gz
CMake-6781a099406d7864f21ccbbf11c1995f8700b159.tar.bz2
libarchive: Cleanup after ZLIB_WINAPI check
Clear CMAKE_REQUIRED_(INCLUDES|LIBRARIES) so that the rest of the checks after this one do not try to link zlib.
Diffstat (limited to 'Utilities/cmlibarchive/CMakeLists.txt')
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 100c12f..9689b28 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -174,6 +174,8 @@ IF(ZLIB_FOUND)
CHECK_C_SOURCE_Runs(
"#ifndef ZLIB_WINAPI\n#define ZLIB_WINAPI\n#endif\n#include <zlib.h>\nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }"
ZLIB_WINAPI)
+ SET(CMAKE_REQUIRED_INCLUDES)
+ SET(CMAKE_REQUIRED_LIBRARIES)
ENDIF(WIN32 AND NOT CYGWIN)
ELSE(ZLIB_FOUND)
MESSAGE(FATAL_ERROR "CMake requires zlib to be available to libarchive")