summaryrefslogtreecommitdiff
path: root/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-04-10 08:33:22 +0200
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-04-11 10:55:50 +0200
commit001efa59610d550b93d8a95324d25ae597febf28 (patch)
treebd31e4966904254f676ff1f8f751ca785f05e391 /Modules/FindZLIB.cmake
parent5ea499262156ce4e84beb692c67639f8c741479a (diff)
downloadcmake-001efa59610d550b93d8a95324d25ae597febf28.tar.gz
FindZLIB: add support for GnuWin32 (fixes #5588)
Diffstat (limited to 'Modules/FindZLIB.cmake')
-rw-r--r--Modules/FindZLIB.cmake11
1 files changed, 9 insertions, 2 deletions
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 9f3b50e10b..f5926460fd 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