diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-10 15:57:02 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-27 19:58:50 (GMT) |
commit | dfb025bf126080f6bb209f6f40ff909c4f5c5c97 (patch) | |
tree | 2e7a0260d84531bcc58d7965918ecc8df5d678ec /Source/cmTarget.cxx | |
parent | 9f2dca805c8010636d4be7ef03d96bfc131c9809 (diff) | |
download | CMake-dfb025bf126080f6bb209f6f40ff909c4f5c5c97.zip CMake-dfb025bf126080f6bb209f6f40ff909c4f5c5c97.tar.gz CMake-dfb025bf126080f6bb209f6f40ff909c4f5c5c97.tar.bz2 |
Move GetLocationForBuild to cmGeneratorTarget.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9122daf..d880cc0 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2748,39 +2748,6 @@ const char* cmTarget::ImportedGetLocation(const std::string& config) const } //---------------------------------------------------------------------------- -const char* cmTarget::GetLocationForBuild() const -{ - static std::string location; - if(this->IsImported()) - { - location = this->ImportedGetFullPath("", false); - return location.c_str(); - } - - // Now handle the deprecated build-time configuration location. - location = this->GetDirectory(); - const char* cfgid = this->Makefile->GetDefinition("CMAKE_CFG_INTDIR"); - if(cfgid && strcmp(cfgid, ".") != 0) - { - location += "/"; - location += cfgid; - } - - if(this->IsAppBundleOnApple()) - { - std::string macdir = this->BuildMacContentDirectory("", "", false); - if(!macdir.empty()) - { - location += "/"; - location += macdir; - } - } - location += "/"; - location += this->GetFullName("", false); - return location.c_str(); -} - -//---------------------------------------------------------------------------- void cmTarget::GetTargetVersion(int& major, int& minor) const { int patch; @@ -2922,8 +2889,11 @@ const char *cmTarget::GetProperty(const std::string& prop, // cannot take into account the per-configuration name of the // target because the configuration type may not be known at // CMake time. - this->Properties.SetProperty( - propLOCATION, this->GetLocationForBuild()); + cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); + gg->CreateGenerationObjects(); + cmGeneratorTarget* gt = gg->GetGeneratorTarget(this); + this->Properties.SetProperty(propLOCATION, + gt->GetLocationForBuild()); } } |