summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-30 18:55:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-30 18:55:35 (GMT)
commit8a6e82724c42920855c2348e914636f52a0c55d5 (patch)
tree9fc53980cac867f2ea8aaf94ee10a96364459ce4 /Source/cmGeneratorTarget.cxx
parent6e900fbe6970981f8c73500581df99fa6b955fa1 (diff)
parent638843af984281c67edcc9ea9e05712ac9075d04 (diff)
downloadCMake-8a6e82724c42920855c2348e914636f52a0c55d5.zip
CMake-8a6e82724c42920855c2348e914636f52a0c55d5.tar.gz
CMake-8a6e82724c42920855c2348e914636f52a0c55d5.tar.bz2
Merge topic 'use-generator-target'
638843a Remove the Location member from cmTarget. 90ef1cf Move GenerateTargetManifest to cmGeneratorTarget. 25f1df3 Split CreateGeneratorTargets into two methods.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx78
1 files changed, 76 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 511ae8a..6217955 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -25,8 +25,6 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t)
this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = this->Makefile->GetLocalGenerator();
this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
- this->ClassifySources();
- this->LookupObjectLibraries();
}
//----------------------------------------------------------------------------
@@ -324,3 +322,79 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories(
{
return this->Target->GetIncludeDirectories(config);
}
+
+//----------------------------------------------------------------------------
+void cmGeneratorTarget::GenerateTargetManifest(const char* config)
+{
+ if (this->Target->IsImported())
+ {
+ return;
+ }
+ cmMakefile* mf = this->Target->GetMakefile();
+ cmLocalGenerator* lg = mf->GetLocalGenerator();
+ cmGlobalGenerator* gg = lg->GetGlobalGenerator();
+
+ // Get the names.
+ std::string name;
+ std::string soName;
+ std::string realName;
+ std::string impName;
+ std::string pdbName;
+ if(this->GetType() == cmTarget::EXECUTABLE)
+ {
+ this->Target->GetExecutableNames(name, realName, impName, pdbName,
+ config);
+ }
+ else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
+ this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->GetType() == cmTarget::MODULE_LIBRARY)
+ {
+ this->Target->GetLibraryNames(name, soName, realName, impName, pdbName,
+ config);
+ }
+ else
+ {
+ return;
+ }
+
+ // Get the directory.
+ std::string dir = this->Target->GetDirectory(config, false);
+
+ // Add each name.
+ std::string f;
+ if(!name.empty())
+ {
+ f = dir;
+ f += "/";
+ f += name;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!soName.empty())
+ {
+ f = dir;
+ f += "/";
+ f += soName;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!realName.empty())
+ {
+ f = dir;
+ f += "/";
+ f += realName;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!pdbName.empty())
+ {
+ f = dir;
+ f += "/";
+ f += pdbName;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!impName.empty())
+ {
+ f = this->Target->GetDirectory(config, true);
+ f += "/";
+ f += impName;
+ gg->AddToManifest(config? config:"", f);
+ }
+}