summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-27 18:02:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-08-27 18:02:51 (GMT)
commit4a1b18db55935ab0a1a960fcea51247f1c5b4551 (patch)
tree1e2846fde2a762555871c071f22b58edbb7ab2ee /Modules
parent07556f15674b7720f9bd7c6b63aedec5d53d8597 (diff)
parentfbbc6e2eef37bd3630b6c3a7571533f81070725d (diff)
downloadCMake-4a1b18db55935ab0a1a960fcea51247f1c5b4551.zip
CMake-4a1b18db55935ab0a1a960fcea51247f1c5b4551.tar.gz
CMake-4a1b18db55935ab0a1a960fcea51247f1c5b4551.tar.bz2
Merge topic 'FindZLIB-ProgramFiles'
fbbc6e2eef FindZLIB: Fix path detection via ProgramFiles env variables Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: RElesgoe <relesgoe@gmail.com> Merge-request: !2287
Diffstat (limited to 'Modules')
-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)