diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-20 06:32:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-09-20 06:34:30 (GMT) |
commit | 879fd354c1db7da04ab244ab8262ec1391ff30e6 (patch) | |
tree | 27d05a0b00e18290b309d5f03231182a5e1027d3 /Source/cmTarget.cxx | |
parent | 6674583caa20244d90aa14a67d059e7228a9f169 (diff) | |
download | CMake-879fd354c1db7da04ab244ab8262ec1391ff30e6.zip CMake-879fd354c1db7da04ab244ab8262ec1391ff30e6.tar.gz CMake-879fd354c1db7da04ab244ab8262ec1391ff30e6.tar.bz2 |
Revert "Move GenerateTargetManifest to cmGeneratorTarget."
This reverts commit 987e12e2f962b6e9ed9f15f8ff486512911b744e.
GenerateTargetManifest is called by the global generator before it
creates the generator targets, so we can't move it to cmGeneratorTarget
yet.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 5a47d17..532d482 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3495,6 +3495,76 @@ bool cmTarget::GetImplibGNUtoMS(std::string const& gnuName, } //---------------------------------------------------------------------------- +void cmTarget::GenerateTargetManifest(const char* config) +{ + cmMakefile* mf = this->Makefile; + 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->GetExecutableNames(name, realName, impName, pdbName, config); + } + else if(this->GetType() == cmTarget::STATIC_LIBRARY || + this->GetType() == cmTarget::SHARED_LIBRARY || + this->GetType() == cmTarget::MODULE_LIBRARY) + { + this->GetLibraryNames(name, soName, realName, impName, pdbName, config); + } + else + { + return; + } + + // Get the directory. + std::string dir = this->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->GetDirectory(config, true); + f += "/"; + f += impName; + gg->AddToManifest(config? config:"", f); + } +} + +//---------------------------------------------------------------------------- void cmTarget::SetPropertyDefault(const char* property, const char* default_value) { |