diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-09-11 14:48:49 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-09-11 14:48:49 (GMT) |
commit | 7e5222165d598b93e3166e9941a67f099fdfecdd (patch) | |
tree | 5b9750bfe144ffc392749379d9bb1d424a1fbdea | |
parent | 7d01e62a924b33cef5d177efbdf7c3e9fc87cdfb (diff) | |
download | CMake-7e5222165d598b93e3166e9941a67f099fdfecdd.zip CMake-7e5222165d598b93e3166e9941a67f099fdfecdd.tar.gz CMake-7e5222165d598b93e3166e9941a67f099fdfecdd.tar.bz2 |
ENH: add installed size to deb package
-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 6c0b46a..d2c691d 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; |