[Cmake-commits] CMake branch, master, updated. 79442f8045ffc51c158237c78037bf1e2ac3f667
cmake-commits at cmake.org
cmake-commits at cmake.org
Sun Apr 11 04:57:09 EDT 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 79442f8045ffc51c158237c78037bf1e2ac3f667 (commit)
via 001efa59610d550b93d8a95324d25ae597febf28 (commit)
via 5ea499262156ce4e84beb692c67639f8c741479a (commit)
from d33303f22fba610532c400f1ed28be449dafab9f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79442f8045ffc51c158237c78037bf1e2ac3f667
commit 79442f8045ffc51c158237c78037bf1e2ac3f667
Author: Kovarththanan Rajaratnam <kovarththanan.rajaratnam at gmail.com>
Date: Sun Apr 11 10:29:20 2010 +0200
FindZLIB: add support for version handling (fixes #5588)
This change depends on the fix for #9414 which should land very soon.
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index f592646..1dac67a 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -1,9 +1,14 @@
# - Find zlib
# Find the native ZLIB includes and library
#
-# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
-# ZLIB_LIBRARIES - List of libraries when using zlib.
-# ZLIB_FOUND - True if zlib found.
+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
+# ZLIB_LIBRARIES - List of libraries when using zlib.
+# ZLIB_FOUND - True if zlib found.
+#
+# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
+# ZLIB_MAJOR_VERSION - the major version of zlib
+# ZLIB_MINOR_VERSION - The minor version of zlib
+# ZLIB_PATCH_VERSION - The patch version of zlib
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -31,6 +36,11 @@ FIND_LIBRARY(ZLIB_LIBRARY
)
MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
+IF (ZLIB_INCLUDE_DIR)
+ FILE(READ "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H)
+ STRING(REGEX REPLACE ".*#define ZLIB_VERSION \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\".*" "\\1.\\2.\\3" ZLIB_VERSION_STRING "${ZLIB_H}")
+ENDIF()
+
# Per-recommendation
SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=001efa59610d550b93d8a95324d25ae597febf28
commit 001efa59610d550b93d8a95324d25ae597febf28
Author: Kovarththanan Rajaratnam <kovarththanan.rajaratnam at gmail.com>
Date: Sat Apr 10 08:33:22 2010 +0200
FindZLIB: add support for GnuWin32 (fixes #5588)
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 9f3b50e..f592646 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -18,10 +18,17 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
+FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
+)
SET(ZLIB_NAMES z zlib zdll)
-FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES})
+FIND_LIBRARY(ZLIB_LIBRARY
+ NAMES
+ ${ZLIB_NAMES}
+ PATHS
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib"
+)
MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
# Per-recommendation
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ea499262156ce4e84beb692c67639f8c741479a
commit 5ea499262156ce4e84beb692c67639f8c741479a
Author: Kovarththanan Rajaratnam <kovarththanan.rajaratnam at gmail.com>
Date: Sat Apr 10 07:53:22 2010 +0200
FindZLIB: FindPackageHandleStandardArgs already contains the quiet handling
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 8066343..9f3b50e 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -18,16 +18,11 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (ZLIB_INCLUDE_DIR)
- # Already in cache, be silent
- SET(ZLIB_FIND_QUIETLY TRUE)
-ENDIF (ZLIB_INCLUDE_DIR)
-
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
SET(ZLIB_NAMES z zlib zdll)
-FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
-MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
+FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES})
+MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
# Per-recommendation
SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
-----------------------------------------------------------------------
Summary of changes:
Modules/FindZLIB.cmake | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list