diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in index 2994c78aa..eea59c3a9 100644 --- a/Modules/NSIS.template.in +++ b/Modules/NSIS.template.in @@ -78,6 +78,9 @@ FunctionEnd Name "@CPACK_PACKAGE_INSTALL_DIRECTORY@" OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@" + ;Set compression + SetCompressor @CPACK_NSIS_COMPRESSOR@ + ;-------------------------------- ;Interface Settings diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 8b1c87998..1b547012b 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -232,6 +232,7 @@ int cmCPackNSISGenerator::InitializeInternal() this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS", deleteStr.str().c_str()); } + this->SetOptionIfNotSet("CPACK_NSIS_COMPRESSOR", "lzma"); return this->Superclass::InitializeInternal(); }