diff options
Diffstat (limited to 'Source/CPack/cmCPackArchiveGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 56e8463..894c24b 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -94,6 +94,18 @@ std::string cmCPackArchiveGenerator::GetArchiveComponentFileName( int cmCPackArchiveGenerator::InitializeInternal() { this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "1"); + cmValue newExtensionValue = this->GetOption("CPACK_ARCHIVE_FILE_EXTENSION"); + if (!newExtensionValue.IsEmpty()) { + std::string newExtension = *newExtensionValue; + if (!cmHasLiteralPrefix(newExtension, ".")) { + newExtension = cmStrCat('.', newExtension); + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Using user-provided file extension " + << newExtension << " instead of the default " + << this->OutputExtension << std::endl); + this->OutputExtension = std::move(newExtension); + } return this->Superclass::InitializeInternal(); } |