]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Cleanup after ZLIB_WINAPI check
authorBrad King <brad.king@kitware.com>
Wed, 11 Jan 2012 13:15:49 +0000 (08:15 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 11 Mar 2012 05:08:34 +0000 (14:08 +0900)
Clear CMAKE_REQUIRED_(INCLUDES|LIBRARIES) so that the rest of the checks
after this one do not try to link zlib.

SVN-Revision: 4133

CMakeLists.txt

index f154051787d9d670187972a58b499aed73b52556..e2a74af810e4e5d3f41ce1da226f6e2fb7626255 100644 (file)
@@ -204,6 +204,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)
 ENDIF(ZLIB_FOUND)
 MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR)