2013-06-10 06:58:12 +02:00
|
|
|
# - Try to find NSIS
|
|
|
|
# Once done this will define
|
|
|
|
#
|
2013-08-16 19:24:09 +02:00
|
|
|
# NSIS_ROOT_PATH - Set this variable to the root installation of NSIS
|
2013-06-10 06:58:12 +02:00
|
|
|
#
|
|
|
|
# Read-Only variables:
|
2013-08-16 19:24:09 +02:00
|
|
|
#
|
2013-06-10 06:58:12 +02:00
|
|
|
# NSIS_FOUND - system has NSIS
|
|
|
|
# NSIS_MAKE - NSIS creator executable
|
|
|
|
#
|
|
|
|
#=============================================================================
|
2013-08-16 19:24:09 +02:00
|
|
|
# Copyright (c) 2010-2013 Andreas Schneider <asn@cryptomilk.org>
|
2013-06-10 06:58:12 +02:00
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#=============================================================================
|
|
|
|
#
|
|
|
|
|
2013-08-16 19:24:09 +02:00
|
|
|
if (WIN32)
|
|
|
|
set(_NSIS_ROOT_HINTS
|
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS;Default]")
|
|
|
|
|
|
|
|
set(_NSIS_ROOT_PATHS
|
|
|
|
$ENV{PROGRAMFILES}/NSIS)
|
|
|
|
|
|
|
|
find_path(NSIS_ROOT_PATH
|
|
|
|
NAMES
|
|
|
|
Include/Library.nsh
|
|
|
|
HINTS
|
|
|
|
${_NSIS_ROOT_HINTS}
|
|
|
|
PATHS
|
|
|
|
${_NSIS_ROOT_PATHS}
|
|
|
|
)
|
|
|
|
mark_as_advanced(NSIS_ROOT_PATH)
|
|
|
|
endif (WIN32)
|
2013-06-10 06:58:12 +02:00
|
|
|
|
|
|
|
find_program(NSIS_MAKE
|
|
|
|
NAMES
|
|
|
|
makensis
|
|
|
|
PATHS
|
|
|
|
${NSIS_ROOT_PATH}
|
|
|
|
)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE)
|
|
|
|
|
2013-08-16 19:24:09 +02:00
|
|
|
if (NSIS_MAKE)
|
|
|
|
set(NSIS_FOUND TRUE)
|
|
|
|
endif (NSIS_MAKE)
|
|
|
|
|
2013-06-10 06:58:12 +02:00
|
|
|
mark_as_advanced(NSIS_MAKE)
|