summaryrefslogtreecommitdiff
path: root/Source/CPack
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:46 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:46 +0900
commitd8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6 (patch)
tree3b73a04e64392300d9670f222fb550669ddad69c /Source/CPack
parent99a800848c2512f7c93504fc7b28e6182a6ceb93 (diff)
downloadcmake-d8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6.tar.gz
cmake-d8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6.tar.bz2
cmake-d8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6.zip
Imported Upstream version 3.20.1upstream/3.20.1
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 263adfdf7..f1cc67747 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -215,9 +215,16 @@ int cmCPackNSISGenerator::PackageFiles()
if (this->IsSet("CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION")) {
std::string wantedPosition =
this->GetOption("CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION");
- const std::set<std::string> possiblePositions{ "CENTER", "LEFT",
- "RIGHT" };
- if (possiblePositions.find(wantedPosition) != possiblePositions.end()) {
+ if (!wantedPosition.empty()) {
+ const std::set<std::string> possiblePositions{ "CENTER", "LEFT",
+ "RIGHT" };
+ if (possiblePositions.find(wantedPosition) ==
+ possiblePositions.end()) {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Unsupported branding text trim position "
+ << wantedPosition << std::endl);
+ return false;
+ }
brandingTextPosition = wantedPosition;
}
}