summaryrefslogtreecommitdiffstats
path: root/Source/cmExportInstallFileGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-15 14:52:48 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-15 16:45:49 (GMT)
commitdd089e08b578f20b7dc7d2ce658e3df05e346e35 (patch)
tree2bae57f141cbff3933ba867a2be0ec98430c27e8 /Source/cmExportInstallFileGenerator.h
parent1b3ab3318dcdabe074da3c95b54f9483d47f95be (diff)
downloadCMake-dd089e08b578f20b7dc7d2ce658e3df05e346e35.zip
CMake-dd089e08b578f20b7dc7d2ce658e3df05e346e35.tar.gz
CMake-dd089e08b578f20b7dc7d2ce658e3df05e346e35.tar.bz2
install: Allow absolute EXPORT destination with relative targets (#15258)
When install(EXPORT) is given an absolute destination we cannot compute the install prefix relative to the installed export file location. Previously we disallowed installation of targets in such exports with a relative destination, but did not enforce this for target property values besides the location of the main target file. This could lead to broken installations when the EXPORT is installed to an absolute path but usage requirements are specified relative to the install prefix. Since an EXPORT installed to an absolute destination cannot be relocated we can just hard-code the value of CMAKE_INSTALL_PREFIX as the base for relative paths. This will allow absolute install(EXPORT) destinations to work with relative destinations for targets and usage requirements. Extend the ExportImport test with a case covering this behavior.
Diffstat (limited to 'Source/cmExportInstallFileGenerator.h')
-rw-r--r--Source/cmExportInstallFileGenerator.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h
index b851ad5..6f86ac9 100644
--- a/Source/cmExportInstallFileGenerator.h
+++ b/Source/cmExportInstallFileGenerator.h
@@ -83,14 +83,10 @@ protected:
std::set<std::string>& importedLocations
);
- void ComplainAboutImportPrefix(cmInstallTargetGenerator* itgen);
-
std::string InstallNameDir(cmTarget* target, const std::string& config);
cmInstallExportGenerator* IEGen;
- std::string ImportPrefix;
-
// The import file generated for each configuration.
std::map<std::string, std::string> ConfigImportFiles;
};