diff options
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 6d69f54..b035bad 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmInstallTargetGenerator.h" #include "cmComputeLinkInformation.h" +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -77,7 +78,8 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, fromDirConfig = this->Target->GetDirectory(config, this->ImportLibrary); fromDirConfig += "/"; } - std::string toDir = this->GetInstallDestination(); + std::string toDir = + this->ConvertToAbsoluteDestination(this->GetDestination(config)); toDir += "/"; // Compute the list of files to install for this target. @@ -322,8 +324,8 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, const char* no_dir_permissions = 0; const char* no_rename = 0; bool optional = this->Optional || this->ImportLibrary; - this->AddInstallRule(os, type, filesFrom, - optional, + this->AddInstallRule(os, this->GetDestination(config), + type, filesFrom, optional, this->FilePermissions.c_str(), no_dir_permissions, no_rename, literal_args.c_str(), indent); @@ -335,6 +337,15 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, //---------------------------------------------------------------------------- std::string +cmInstallTargetGenerator::GetDestination(std::string const& config) const +{ + cmGeneratorExpression ge; + return ge.Parse(this->Destination) + ->Evaluate(this->Target->GetMakefile(), config); +} + +//---------------------------------------------------------------------------- +std::string cmInstallTargetGenerator::GetInstallFilename(const std::string& config) const { NameType nameType = this->ImportLibrary? NameImplib : NameNormal; |