summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalGenerator.cxx14
-rw-r--r--Source/cmGlobalGenerator.h1
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h1
3 files changed, 16 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"))
{
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 66a35a8..9325107 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -185,6 +185,7 @@ public:
virtual const char* GetPreinstallTargetName() { return 0; }
virtual const char* GetTestTargetName() { return "RUN_TESTS"; }
virtual const char* GetPackageTargetName() { return "PACKAGE"; }
+ virtual const char* GetPackageSourceTargetName(){ return 0; }
virtual const char* GetEditCacheTargetName() { return 0; }
virtual const char* GetRebuildCacheTargetName() { return 0; }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 6ad6ec9..76bc011 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -144,6 +144,7 @@ protected:
virtual const char* GetPreinstallTargetName() { return "preinstall"; }
virtual const char* GetTestTargetName() { return "test"; }
virtual const char* GetPackageTargetName() { return "package"; }
+ virtual const char* GetPackageSourceTargetName(){ return "package_source"; }
virtual const char* GetEditCacheTargetName() { return "edit_cache"; }
virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; }