summaryrefslogtreecommitdiffstats
path: root/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-08-13 19:53:17 (GMT)
committerAndreas Schneider <asn@cryptomilk.org>2018-08-24 05:24:00 (GMT)
commitfbbc6e2eef37bd3630b6c3a7571533f81070725d (patch)
treeff54f16db8744849cd8896e62b7257ab4fc7fb04 /Modules/FindZLIB.cmake
parente33c6c357b61ed0cc5b9f7c01e4ea04deca26b39 (diff)
downloadCMake-fbbc6e2eef37bd3630b6c3a7571533f81070725d.zip
CMake-fbbc6e2eef37bd3630b6c3a7571533f81070725d.tar.gz
CMake-fbbc6e2eef37bd3630b6c3a7571533f81070725d.tar.bz2
FindZLIB: Fix path detection via ProgramFiles env variables
Diffstat (limited to 'Modules/FindZLIB.cmake')
-rw-r--r--Modules/FindZLIB.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index a5c04ac..1a4635a 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -58,10 +58,12 @@ if(ZLIB_ROOT)
endif()
# Normal search.
+set(_ZLIB_x86 "(x86)")
set(_ZLIB_SEARCH_NORMAL
- PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
- "$ENV{PROGRAMFILES}/zlib"
- )
+ PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
+ "$ENV{ProgramFiles}/zlib"
+ "$ENV{ProgramFiles${_ZLIB_x86}}/zlib")
+unset(_ZLIB_x86)
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
set(ZLIB_NAMES z zlib zdll zlib1)