summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2023-04-17 09:57:51 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-04-17 09:58:05 (GMT)
commitb79c444e53ff13265e500ba9eebdf4d22482be36 (patch)
treea47388d4e4d7cb69ea32efa28a8c52a1faa3a9c0 /Source
parentae1e8e288ec2be1856b5a784507dfeec28999ebd (diff)
parent42e5be8cefd98e819df9b6a5edce7023007f305e (diff)
downloadCMake-b79c444e53ff13265e500ba9eebdf4d22482be36.zip
CMake-b79c444e53ff13265e500ba9eebdf4d22482be36.tar.gz
CMake-b79c444e53ff13265e500ba9eebdf4d22482be36.tar.bz2
Merge topic 'export-file-set-old-cmake-versions'
42e5be8cef install(EXPORT): Fall back to set_property(APPEND) for FILE_SET Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8408
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportFileGenerator.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 6e7ef4e..511b28d 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -1309,7 +1309,22 @@ void cmExportFileGenerator::GenerateTargetFileSets(cmGeneratorTarget* gte,
<< this->GetFileSetFiles(gte, fileSet, te) << "\n";
}
- os << " )\nendif()\n\n";
+ os << " )\nelse()\n set_property(TARGET " << targetName
+ << "\n APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES";
+ for (auto const& name : interfaceFileSets) {
+ auto* fileSet = gte->Target->GetFileSet(name);
+ if (!fileSet) {
+ gte->Makefile->IssueMessage(
+ MessageType::FATAL_ERROR,
+ cmStrCat("File set \"", name,
+ "\" is listed in interface file sets of ", gte->GetName(),
+ " but has not been created"));
+ return;
+ }
+
+ os << "\n " << this->GetFileSetDirectories(gte, fileSet, te);
+ }
+ os << "\n )\nendif()\n\n";
}
}