summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-03 12:40:28 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-03 12:40:28 (GMT)
commit789eaf157c1587e4eff9c2627c50e537fc56ba71 (patch)
tree32b8063e423c588d4a70b15c8160594ae1cbaac7 /Source/cmInstallTargetGenerator.cxx
parent7c05c7bd8958c2314d1204f16ac1de365482b000 (diff)
downloadCMake-789eaf157c1587e4eff9c2627c50e537fc56ba71.zip
CMake-789eaf157c1587e4eff9c2627c50e537fc56ba71.tar.gz
CMake-789eaf157c1587e4eff9c2627c50e537fc56ba71.tar.bz2
ENH: Cleanup per-config target install generation
This cleans up cmInstallTargetGenerator's code that computes the build tree location of a target under each configuration.
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r--Source/cmInstallTargetGenerator.cxx31
1 files changed, 13 insertions, 18 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index c4a9103..dc3b139 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -58,20 +58,6 @@ void cmInstallTargetGenerator::GenerateScript(std::ostream& os)
cmSystemTools::Message(msg.str().c_str(), "Warning");
}
- // Compute the build tree directory from which to copy the target.
- std::string& fromDir = this->FromDir;
- if(this->Target->NeedRelinkBeforeInstall())
- {
- fromDir = this->Target->GetMakefile()->GetStartOutputDirectory();
- fromDir += cmake::GetCMakeFilesDirectory();
- fromDir += "/CMakeRelink.dir/";
- }
- else
- {
- fromDir = this->Target->GetDirectory(0, this->ImportLibrary);
- fromDir += "/";
- }
-
// Perform the main install script generation.
this->cmInstallGenerator::GenerateScript(os);
}
@@ -81,10 +67,19 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
const char* config,
Indent const& indent)
{
- // Compute the per-configuration directory containing the files.
- std::string fromDirConfig = this->FromDir;
- this->Target->GetMakefile()->GetLocalGenerator()->GetGlobalGenerator()
- ->AppendDirectoryForConfig("", config, "/", fromDirConfig);
+ // Compute the build tree directory from which to copy the target.
+ std::string fromDirConfig;
+ if(this->Target->NeedRelinkBeforeInstall())
+ {
+ fromDirConfig = this->Target->GetMakefile()->GetStartOutputDirectory();
+ fromDirConfig += cmake::GetCMakeFilesDirectory();
+ fromDirConfig += "/CMakeRelink.dir/";
+ }
+ else
+ {
+ fromDirConfig = this->Target->GetDirectory(config, this->ImportLibrary);
+ fromDirConfig += "/";
+ }
// Compute the full path to the main installed file for this target.
NameType nameType = this->ImportLibrary? NameImplib : NameNormal;