summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackSTGZGenerator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-01 18:23:15 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-01 18:23:15 (GMT)
commita8bb20dce51bba260f171c7f7193119aa6817990 (patch)
tree6dd29078e7a6fcf128f86792015c7d9a14041d1a /Source/CPack/cmCPackSTGZGenerator.cxx
parent689a4e4e12e0f38bf3e2c76eb6e53a8b2e956b09 (diff)
downloadCMake-a8bb20dce51bba260f171c7f7193119aa6817990.zip
CMake-a8bb20dce51bba260f171c7f7193119aa6817990.tar.gz
CMake-a8bb20dce51bba260f171c7f7193119aa6817990.tar.bz2
ENH: Add license and make it more verbose
Diffstat (limited to 'Source/CPack/cmCPackSTGZGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 9346b3e..944e319 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -84,11 +84,20 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
cmsys_ios::ostringstream str;
int counter = 0;
+ std::string inLicFile = this->GetOption("CPACK_RESOURCE_FILE_LICENSE");
+ std::string line;
+ std::ifstream ilfs(inLicFile.c_str());
+ std::string licenseText;
+ while ( cmSystemTools::GetLineFromStream(ilfs, line) )
+ {
+ licenseText += line + "\n";
+ }
+ this->SetOptionIfNotSet("CPACK_RESOURCE_FILE_LICENSE_CONTENT", licenseText.c_str());
+
const char headerLengthTag[] = "###CPACK_HEADER_LENGTH###";
// Create the header
std::string inFile = this->GetOption("CPACK_STGZ_HEADER_FILE");
- std::string line;
std::ifstream ifs(inFile.c_str());
std::string packageHeaderText;
while ( cmSystemTools::GetLineFromStream(ifs, line) )