diff options
author | Brad King <brad.king@kitware.com> | 2021-03-25 14:23:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-03-25 14:23:25 (GMT) |
commit | fde2347f98029af31f7a0d264eea964bcd86c56b (patch) | |
tree | dbdb9c1b312edbd7763103d2dfca08ad89dc938e /Source | |
parent | c0aa4244f5b1900c280b54a5453cc881dc7d3d95 (diff) | |
parent | f226a1678fe27817649ec536ad2923a98a7646a3 (diff) | |
download | CMake-fde2347f98029af31f7a0d264eea964bcd86c56b.zip CMake-fde2347f98029af31f7a0d264eea964bcd86c56b.tar.gz CMake-fde2347f98029af31f7a0d264eea964bcd86c56b.tar.bz2 |
Merge topic 'nsis-branding-trim-position'
f226a1678f Merge branch 'master' into nsis-branding-trim-position
a6a5256395 CPack: Validate and document NSIS branding text trim positions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5928
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 9b00704..6bd0d1b 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; } } |