diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-09-11 10:48:49 -0400 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-09-11 10:48:49 -0400 |
commit | 7e5222165d598b93e3166e9941a67f099fdfecdd (patch) | |
tree | 5b9750bfe144ffc392749379d9bb1d424a1fbdea /Source/CPack/cmCPackDebGenerator.cxx | |
parent | 7d01e62a924b33cef5d177efbdf7c3e9fc87cdfb (diff) | |
download | cmake-7e5222165d598b93e3166e9941a67f099fdfecdd.tar.gz |
ENH: add installed size to deb package
Diffstat (limited to 'Source/CPack/cmCPackDebGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 6c0b46a5e9..d2c691d8aa 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -116,6 +116,17 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName, { out << "Suggests: " << debian_pkg_sug << "\n"; } + unsigned long totalSize = 0; + { + std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + dirName += '/'; + for (std::vector<std::string>::const_iterator fileIt = files.begin(); + fileIt != files.end(); ++ fileIt ) + { + totalSize += cmSystemTools::FileLength(fileIt->c_str()); + } + } + out << "Installed-Size: " << totalSize << "\n"; out << "Maintainer: " << maintainer << "\n"; out << "Description: " << desc << "\n"; out << std::endl; |