summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-10 18:48:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-10 18:48:47 (GMT)
commit78f9c9dd0e497641e1383a7da2d6cac071cfde46 (patch)
tree85c9402e6fcb9def5a5ae89e4a5732bffcf7348c /Source/CPack
parent4409bfbe9b1d8d977cfb3b107e2dac344ba99dfd (diff)
parentebfffc609e2bfe974a0f56b64285089e7eac4257 (diff)
downloadCMake-78f9c9dd0e497641e1383a7da2d6cac071cfde46.zip
CMake-78f9c9dd0e497641e1383a7da2d6cac071cfde46.tar.gz
CMake-78f9c9dd0e497641e1383a7da2d6cac071cfde46.tar.bz2
Merge topic 'nsis-headerimage'
ebfffc609e CPack/NSIS: Add option for setting MUI_HEADERIMAGE_BITMAP Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4157
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 4702639..363f536 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -139,10 +139,15 @@ int cmCPackNSISGenerator::PackageFiles()
this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_ICON_CODE",
installerIconCode.c_str());
}
- if (this->IsSet("CPACK_PACKAGE_ICON")) {
- std::string installerIconCode =
- cmStrCat("!define MUI_HEADERIMAGE_BITMAP \"",
- this->GetOption("CPACK_PACKAGE_ICON"), "\"\n");
+ std::string installerHeaderImage;
+ if (this->IsSet("CPACK_NSIS_MUI_HEADERIMAGE")) {
+ installerHeaderImage = this->GetOption("CPACK_NSIS_MUI_HEADERIMAGE");
+ } else if (this->IsSet("CPACK_PACKAGE_ICON")) {
+ installerHeaderImage = this->GetOption("CPACK_PACKAGE_ICON");
+ }
+ if (!installerHeaderImage.empty()) {
+ std::string installerIconCode = cmStrCat(
+ "!define MUI_HEADERIMAGE_BITMAP \"", installerHeaderImage, "\"\n");
this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_ICON_CODE",
installerIconCode.c_str());
}