summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-23 13:10:59 +0000
committerKitware Robot <kwrobot@kitware.com>2021-02-23 08:11:05 -0500
commitec5f76753ad92ac03a4581d67a302792e030b6c4 (patch)
treeca27cb50d035e6b5e44f2f14e6767c684cbf76b4
parent581402f00c32172f8f74086ccfb26b20cf08dc5a (diff)
parent8e8b99d01a6b2ce266a9401f760f4814a69e4853 (diff)
downloadcmake-ec5f76753ad92ac03a4581d67a302792e030b6c4.tar.gz
Merge topic 'cpack_nsis_executable_custom'
8e8b99d01a CPack/NSIS: Add option for setting custom makensis executable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5839
-rw-r--r--Help/cpack_gen/nsis.rst6
-rw-r--r--Help/release/dev/cpack-nsis-executable-name.rst6
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx4
3 files changed, 15 insertions, 1 deletions
diff --git a/Help/cpack_gen/nsis.rst b/Help/cpack_gen/nsis.rst
index eaef8ae73e..964f629657 100644
--- a/Help/cpack_gen/nsis.rst
+++ b/Help/cpack_gen/nsis.rst
@@ -193,3 +193,9 @@ on Windows Nullsoft Scriptable Install System.
.. versionadded:: 3.20
If set, trim down the size of the control to the size of the branding text string.
+
+.. variable:: CPACK_NSIS_EXECUTABLE
+
+ .. versionadded:: 3.21
+
+ If set, specify the name of the NSIS executable. Default is ``makensis``.
diff --git a/Help/release/dev/cpack-nsis-executable-name.rst b/Help/release/dev/cpack-nsis-executable-name.rst
new file mode 100644
index 0000000000..a3818db192
--- /dev/null
+++ b/Help/release/dev/cpack-nsis-executable-name.rst
@@ -0,0 +1,6 @@
+cpack-nsis-executable-name
+--------------------------
+
+* The :cpack_gen:`CPack NSIS Generator` gained a new variable
+ :variable:`CPACK_NSIS_EXECUTABLE` to specify the makensis
+ executable to use instead of the default one.
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 263adfdf77..9b007045e7 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -430,7 +430,9 @@ int cmCPackNSISGenerator::InitializeInternal()
}
#endif
- nsisPath = cmSystemTools::FindProgram("makensis", path, false);
+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis");
+ nsisPath = cmSystemTools::FindProgram(
+ this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false);
if (nsisPath.empty()) {
cmCPackLogger(