diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index c4a91039e..dc3b139ee 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; diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index 3a2f0d00b..9e89ed2c8 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -90,7 +90,6 @@ protected: std::string FilePermissions; bool Optional; NamelinkModeType NamelinkMode; - std::string FromDir; }; #endif