diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-08-13 19:53:17 (GMT) |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-08-24 05:24:00 (GMT) |
commit | fbbc6e2eef37bd3630b6c3a7571533f81070725d (patch) | |
tree | ff54f16db8744849cd8896e62b7257ab4fc7fb04 /Modules | |
parent | e33c6c357b61ed0cc5b9f7c01e4ea04deca26b39 (diff) | |
download | CMake-fbbc6e2eef37bd3630b6c3a7571533f81070725d.zip CMake-fbbc6e2eef37bd3630b6c3a7571533f81070725d.tar.gz CMake-fbbc6e2eef37bd3630b6c3a7571533f81070725d.tar.bz2 |
FindZLIB: Fix path detection via ProgramFiles env variables
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindZLIB.cmake | 8 |
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) |