diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-14 17:04:25 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-10-27 19:29:45 (GMT) |
commit | 90ef1cfe4882139d9fe525352bc8e2e86b69f1db (patch) | |
tree | 1f45dffb70f00a2b0b8947d5cadbad4629ee764e /Source/cmGeneratorTarget.cxx | |
parent | 25f1df3e816b62a518206cb88f69fdb15b2eebc9 (diff) | |
download | CMake-90ef1cfe4882139d9fe525352bc8e2e86b69f1db.zip CMake-90ef1cfe4882139d9fe525352bc8e2e86b69f1db.tar.gz CMake-90ef1cfe4882139d9fe525352bc8e2e86b69f1db.tar.bz2 |
Move GenerateTargetManifest to cmGeneratorTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 0cc2e92..5ceec91 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -315,3 +315,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); + } +} |