Xcode: Propagate system include directories to Swift compiler

Previously, only non-system include directories would be propagated to
Swift. This meant that if, for example, an IMPORTED target contained a
Swift module, that module would not be found by a Swift consumer.

Fixes: #28097
This commit is contained in:
jcm
2026-09-22 12:31:00 -05:00
parent ec85176fbe
commit a3ff10a963
+4
View File
@@ -3090,6 +3090,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
if (!sysdirs.IsEmpty()) {
buildSettings->AddAttribute("SYSTEM_HEADER_SEARCH_PATHS",
sysdirs.CreateList());
if (languages.count("Swift")) {
buildSettings->AddAttribute("SWIFT_SYSTEM_INCLUDE_PATHS",
sysdirs.CreateList());
}
}
if (this->XcodeVersion >= 60 && !emitSystemIncludes) {