summaryrefslogtreecommitdiffstats
path: root/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-04-10 06:33:22 (GMT)
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-04-11 08:55:50 (GMT)
commit001efa59610d550b93d8a95324d25ae597febf28 (patch)
treebd31e4966904254f676ff1f8f751ca785f05e391 /Modules/FindZLIB.cmake
parent5ea499262156ce4e84beb692c67639f8c741479a (diff)
downloadCMake-001efa59610d550b93d8a95324d25ae597febf28.zip
CMake-001efa59610d550b93d8a95324d25ae597febf28.tar.gz
CMake-001efa59610d550b93d8a95324d25ae597febf28.tar.bz2
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 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