summaryrefslogtreecommitdiff
path: root/Source/cmExportInstallFileGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-27 09:43:44 +0100
committerStephen Kelly <steveire@gmail.com>2013-01-27 09:59:26 +0100
commit34d1ade048a87953c089d730f0126eecb6685968 (patch)
treef9d3ac9c7f5829ef8e1d881f8ab80583243f9644 /Source/cmExportInstallFileGenerator.cxx
parent3a1719793fa4eb4024e2e36e17196832551d469c (diff)
downloadcmake-34d1ade048a87953c089d730f0126eecb6685968.tar.gz
Add the INSTALL_PREFIX genex.
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r--Source/cmExportInstallFileGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index c7e3581d74..b6600f0b48 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -155,6 +155,21 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
}
//----------------------------------------------------------------------------
+void
+cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string &input)
+{
+ std::string::size_type pos = 0;
+ std::string::size_type lastPos = pos;
+
+ while((pos = input.find("$<INSTALL_PREFIX>", lastPos)) != input.npos)
+ {
+ std::string::size_type endPos = pos + sizeof("$<INSTALL_PREFIX>") - 1;
+ input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}");
+ lastPos = endPos;
+ }
+}
+
+//----------------------------------------------------------------------------
bool
cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config,
std::vector<std::string> &missingTargets)