summaryrefslogtreecommitdiff
path: root/Source/CPack
diff options
context:
space:
mode:
authorJohnny Jazeix <jazeix@gmail.com>2021-08-01 18:27:49 +0200
committerJohnny Jazeix <jazeix@gmail.com>2021-08-01 18:28:47 +0200
commit795e406e3bbd99024652f44fc121f36cd291c269 (patch)
tree877f7d994675b0c5858f36117e5c9666ef2ee55e /Source/CPack
parent0a6415ea1fa286346f119809323938a7cfca8565 (diff)
downloadcmake-795e406e3bbd99024652f44fc121f36cd291c269.tar.gz
CPack/NSIS: Add option to not display license page
Fixes: #22215
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 6bd0d1b2a8..4a494e14ac 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -235,6 +235,13 @@ int cmCPackNSISGenerator::PackageFiles()
brandingTextCode.c_str());
}
+ if (!this->IsSet("CPACK_NSIS_IGNORE_LICENSE_PAGE")) {
+ std::string licenceCode =
+ cmStrCat("!insertmacro MUI_PAGE_LICENSE \"",
+ this->GetOption("CPACK_RESOURCE_FILE_LICENSE"), "\"\n");
+ this->SetOptionIfNotSet("CPACK_NSIS_LICENSE_PAGE", licenceCode.c_str());
+ }
+
// Setup all of the component sections
if (this->Components.empty()) {
this->SetOptionIfNotSet("CPACK_NSIS_INSTALLATION_TYPES", "");