summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-08-13 21:38:10 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-08-13 22:12:19 +0200
commita2c14c5ec55d9ebacd108835fc248ca5be18388b (patch)
tree86c403d0017321b066609abdaa663b22bd73a9a0
parentb99849c831bae1d7993d724cc706afc6bb05086a (diff)
downloadlibssh-a2c14c5ec55d9ebacd108835fc248ca5be18388b.tar.gz
libssh-a2c14c5ec55d9ebacd108835fc248ca5be18388b.tar.xz
libssh-a2c14c5ec55d9ebacd108835fc248ca5be18388b.zip
cmake: Improve NSIS detection on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit 0656f8a43d2ecc0374fdc1627ec49dd258ca7b88)
-rw-r--r--cmake/Modules/FindNSIS.cmake9
1 files changed, 4 insertions, 5 deletions
diff --git a/cmake/Modules/FindNSIS.cmake b/cmake/Modules/FindNSIS.cmake
index 21f80d86..9f1ab176 100644
--- a/cmake/Modules/FindNSIS.cmake
+++ b/cmake/Modules/FindNSIS.cmake
@@ -21,17 +21,16 @@
#
if (WIN32)
- set(_NSIS_ROOT_HINTS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS;Default]")
+ set(_x86 "(x86)")
set(_NSIS_ROOT_PATHS
- $ENV{PROGRAMFILES}/NSIS)
+ "$ENV{ProgramFiles}/NSIS"
+ "$ENV{ProgramFiles${_x86}}/NSIS"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS;Default]")
find_path(NSIS_ROOT_PATH
NAMES
Include/Library.nsh
- HINTS
- ${_NSIS_ROOT_HINTS}
PATHS
${_NSIS_ROOT_PATHS}
)