summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackNSISGenerator.cxx
diff options
context:
space:
mode:
authorJohnny Jazeix <jazeix@gmail.com>2021-08-01 16:27:49 (GMT)
committerJohnny Jazeix <jazeix@gmail.com>2021-08-01 16:28:47 (GMT)
commit795e406e3bbd99024652f44fc121f36cd291c269 (patch)
tree877f7d994675b0c5858f36117e5c9666ef2ee55e /Source/CPack/cmCPackNSISGenerator.cxx
parent0a6415ea1fa286346f119809323938a7cfca8565 (diff)
downloadCMake-795e406e3bbd99024652f44fc121f36cd291c269.zip
CMake-795e406e3bbd99024652f44fc121f36cd291c269.tar.gz
CMake-795e406e3bbd99024652f44fc121f36cd291c269.tar.bz2
CPack/NSIS: Add option to not display license page
Fixes: #22215
Diffstat (limited to 'Source/CPack/cmCPackNSISGenerator.cxx')
-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 6bd0d1b..4a494e1 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", "");