summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-04-17 19:26:54 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-04-17 19:26:54 (GMT)
commit1e608c912cf5f5f61f7fd8d66000549aa9621b88 (patch)
tree55bf71550f00374e63cfd24f0b8c1a63e8e91338 /Source/cmGlobalGenerator.cxx
parent688e630f6b8f583f9adccb00906eb6e7913cf4f2 (diff)
downloadCMake-1e608c912cf5f5f61f7fd8d66000549aa9621b88.zip
CMake-1e608c912cf5f5f61f7fd8d66000549aa9621b88.tar.gz
CMake-1e608c912cf5f5f61f7fd8d66000549aa9621b88.tar.bz2
ENH: Add packaging of source code (make package_source)
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 79181cc..b44c44f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1313,6 +1313,20 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
= this->CreateGlobalTarget(this->GetPackageTargetName(),
"Run CPack packaging tool...", &cpackCommandLines, depends);
+ // CPack
+ cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end());
+ singleLine.erase(singleLine.begin(), singleLine.end());
+ depends.erase(depends.begin(), depends.end());
+ singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand());
+ singleLine.push_back("--config");
+ configFile = mf->GetStartOutputDirectory();;
+ configFile += "/CPackSourceConfig.cmake";
+ singleLine.push_back(configFile);
+ cpackCommandLines.push_back(singleLine);
+ (*targets)[this->GetPackageSourceTargetName()]
+ = this->CreateGlobalTarget(this->GetPackageSourceTargetName(),
+ "Run CPack packaging tool for source...", &cpackCommandLines, depends);
+
// Test
if(mf->IsOn("CMAKE_TESTING_ENABLED"))
{