diff options
Diffstat (limited to 'Source/cmInstallFilesGenerator.cxx')
-rw-r--r-- | Source/cmInstallFilesGenerator.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index c45000d..0a353e4 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -25,10 +25,14 @@ cmInstallFilesGenerator::cmInstallFilesGenerator( , Programs(programs) , Optional(optional) { - // We need per-config actions if the destination has generator expressions. + // We need per-config actions if the destination and rename have generator + // expressions. if (cmGeneratorExpression::Find(this->Destination) != std::string::npos) { this->ActionsPerConfig = true; } + if (cmGeneratorExpression::Find(this->Rename) != std::string::npos) { + this->ActionsPerConfig = true; + } // We need per-config actions if any directories have generator expressions. if (!this->ActionsPerConfig) { @@ -56,6 +60,12 @@ std::string cmInstallFilesGenerator::GetDestination( this->LocalGenerator, config); } +std::string cmInstallFilesGenerator::GetRename(std::string const& config) const +{ + return cmGeneratorExpression::Evaluate(this->Rename, this->LocalGenerator, + config); +} + void cmInstallFilesGenerator::AddFilesInstallRule( std::ostream& os, std::string const& config, Indent indent, std::vector<std::string> const& files) @@ -66,7 +76,7 @@ void cmInstallFilesGenerator::AddFilesInstallRule( os, this->GetDestination(config), (this->Programs ? cmInstallType_PROGRAMS : cmInstallType_FILES), files, this->Optional, this->FilePermissions.c_str(), no_dir_permissions, - this->Rename.c_str(), nullptr, indent); + this->GetRename(config).c_str(), nullptr, indent); } void cmInstallFilesGenerator::GenerateScriptActions(std::ostream& os, |