aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-01-16 12:12:35 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-01-16 12:12:35 +0100
commitc6e1792696829788572c82db5533f00a8ef42d2d (patch)
tree1f09774ef45a89dc3f89765ab128a01d2eeecaaf /cmake/Modules
parent90fc5554e1438a506f7c05d2341a6c1a9c2e5004 (diff)
downloadlibssh-c6e1792696829788572c82db5533f00a8ef42d2d.tar.gz
libssh-c6e1792696829788572c82db5533f00a8ef42d2d.tar.xz
libssh-c6e1792696829788572c82db5533f00a8ef42d2d.zip
cmake: Improved the NSIS module.
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindNSIS.cmake33
1 files changed, 26 insertions, 7 deletions
diff --git a/cmake/Modules/FindNSIS.cmake b/cmake/Modules/FindNSIS.cmake
index c92c2401..9bc6d395 100644
--- a/cmake/Modules/FindNSIS.cmake
+++ b/cmake/Modules/FindNSIS.cmake
@@ -1,23 +1,42 @@
# - Try to find NSIS
# Once done this will define
#
+# NSIS_ROOT_DIR - Set this variable to the root installation of ZLIB
+#
+# Read-Only variables:
# NSIS_FOUND - system has NSIS
# NSIS_MAKE - NSIS creator executable
#
-# Copyright (c) 2010 Andreas Schneider <mail@cynapses.org>
+#=============================================================================
+# Copyright (c) 2010-2011 Andreas Schneider <asn@cryptomilk.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
-# Redistribution and use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
#
+set(_NSIS_ROOT_PATHS
+ C:/NSIS/Bin
+ "$ENV{PROGRAMFILES}/NSIS"
+)
+
+find_path(NSIS_ROOT_PATHS
+ NAMES
+ NSIS.exe
+ PATHS
+ ${_NSIS_ROOT_PATHS}
+)
+
find_program(NSIS_MAKE
NAMES
makensis
PATHS
- ${_NSIS_DIR}
- ${_NSIS_DIR}/Bin
- $ENV{PROGRAMFILES}/NSIS
+ ${NSIS_ROOT_PATH}
+ ${NSIS_ROOT_PATH}/Bin
)
include(FindPackageHandleStandardArgs)