summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallScriptGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-02-24 15:17:45 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-02-24 15:17:45 (GMT)
commit18e02ace5b2c2318252acea5f53062ef8bd0e3c6 (patch)
tree2fd11fc551fa2e1da1a21f11ba20cdc73f22e27b /Source/cmInstallScriptGenerator.cxx
parent35ca2d524befc71b840808cce4e0a773ef722b71 (diff)
downloadCMake-18e02ace5b2c2318252acea5f53062ef8bd0e3c6.zip
CMake-18e02ace5b2c2318252acea5f53062ef8bd0e3c6.tar.gz
CMake-18e02ace5b2c2318252acea5f53062ef8bd0e3c6.tar.bz2
install(CODE|SCRIPT): Support $<INSTALL_PREFIX> genex
Fixes: #24534
Diffstat (limited to 'Source/cmInstallScriptGenerator.cxx')
-rw-r--r--Source/cmInstallScriptGenerator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx
index a5625fe..af531f2 100644
--- a/Source/cmInstallScriptGenerator.cxx
+++ b/Source/cmInstallScriptGenerator.cxx
@@ -56,12 +56,12 @@ bool cmInstallScriptGenerator::Compute(cmLocalGenerator* lg)
std::string cmInstallScriptGenerator::GetScript(
std::string const& config) const
{
- std::string script;
+ std::string script = this->Script;
if (this->AllowGenex && this->ActionsPerConfig) {
- script = cmGeneratorExpression::Evaluate(this->Script,
- this->LocalGenerator, config);
- } else {
- script = this->Script;
+ cmGeneratorExpression::ReplaceInstallPrefix(script,
+ "${CMAKE_INSTALL_PREFIX}");
+ script =
+ cmGeneratorExpression::Evaluate(script, this->LocalGenerator, config);
}
return script;
}