|
@@ -590,10 +590,12 @@ std::string cmExportInstallFileGenerator::GetFileSetDirectories(
|
|
|
auto cge = ge.Parse(te->FileSetGenerators.at(fileSet)->GetDestination());
|
|
|
|
|
|
for (auto const& config : configs) {
|
|
|
- auto dest = cmStrCat("${_IMPORT_PREFIX}/",
|
|
|
- cmOutputConverter::EscapeForCMake(
|
|
|
- cge->Evaluate(gte->LocalGenerator, config, gte),
|
|
|
- cmOutputConverter::WrapQuotes::NoWrap));
|
|
|
+ auto unescapedDest = cge->Evaluate(gte->LocalGenerator, config, gte);
|
|
|
+ auto dest = cmOutputConverter::EscapeForCMake(
|
|
|
+ unescapedDest, cmOutputConverter::WrapQuotes::NoWrap);
|
|
|
+ if (!cmSystemTools::FileIsFullPath(unescapedDest)) {
|
|
|
+ dest = cmStrCat("${_IMPORT_PREFIX}/", dest);
|
|
|
+ }
|
|
|
|
|
|
auto const& type = fileSet->GetType();
|
|
|
// C++ modules do not support interface file sets which are dependent upon
|
|
@@ -645,11 +647,14 @@ std::string cmExportInstallFileGenerator::GetFileSetFiles(
|
|
|
fileSet->EvaluateFileEntry(directories, files, entry,
|
|
|
gte->LocalGenerator, config, gte);
|
|
|
}
|
|
|
- auto dest = cmStrCat("${_IMPORT_PREFIX}/",
|
|
|
- cmOutputConverter::EscapeForCMake(
|
|
|
- destCge->Evaluate(gte->LocalGenerator, config, gte),
|
|
|
- cmOutputConverter::WrapQuotes::NoWrap),
|
|
|
- '/');
|
|
|
+ auto unescapedDest = destCge->Evaluate(gte->LocalGenerator, config, gte);
|
|
|
+ auto dest =
|
|
|
+ cmStrCat(cmOutputConverter::EscapeForCMake(
|
|
|
+ unescapedDest, cmOutputConverter::WrapQuotes::NoWrap),
|
|
|
+ '/');
|
|
|
+ if (!cmSystemTools::FileIsFullPath(unescapedDest)) {
|
|
|
+ dest = cmStrCat("${_IMPORT_PREFIX}/", dest);
|
|
|
+ }
|
|
|
|
|
|
bool const contextSensitive = destCge->GetHadContextSensitiveCondition() ||
|
|
|
std::any_of(directoryEntries.begin(), directoryEntries.end(),
|