diff options
author | Brad King <brad.king@kitware.com> | 2015-02-11 16:45:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-11 20:05:57 (GMT) |
commit | f99991db882c2f4cf8246b9c272845faaa5bbce5 (patch) | |
tree | 9e3e6a631610793d35ca6bd0605bb0b1f131d79a /Source/cmExportInstallFileGenerator.cxx | |
parent | f00829a9384283ef1cf86b337b41eaed30ca7ded (diff) | |
download | CMake-f99991db882c2f4cf8246b9c272845faaa5bbce5.zip CMake-f99991db882c2f4cf8246b9c272845faaa5bbce5.tar.gz CMake-f99991db882c2f4cf8246b9c272845faaa5bbce5.tar.bz2 |
cmInstallGenerator: Move GetDestination to subclasses that need it
The method is used only for EXPORT and TARGET install destinations.
While at it, make it return a std::string by reference instead of a
"const char*".
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index a0d9013..053c022 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -73,8 +73,8 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) // to reference if they are relative to the install prefix. std::string installPrefix = this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX"); - const char* installDest = this->IEGen->GetDestination(); - if(cmSystemTools::FileIsFullPath(installDest)) + std::string const& expDest = this->IEGen->GetDestination(); + if(cmSystemTools::FileIsFullPath(expDest)) { // The export file is being installed to an absolute path so the // package is not relocatable. Use the configured install prefix. @@ -87,7 +87,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { // Add code to compute the installation prefix relative to the // import file location. - std::string absDest = installPrefix + "/" + installDest; + std::string absDest = installPrefix + "/" + expDest; std::string absDestS = absDest + "/"; os << "# Compute the installation prefix relative to this file.\n" << "get_filename_component(_IMPORT_PREFIX" @@ -109,7 +109,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) "unset(_realOrig)\n" "unset(_realCurr)\n"; } - std::string dest = installDest; + std::string dest = expDest; while(!dest.empty()) { os << |