Xcode: Don't add frameworks without absolute paths to Frameworks PBXGroup

We can't represent frameworks as PBXFileReferences unless we have
an existing absolute path, or are able to resolve relative paths
(including framework name only) to an SDK-root relative or absolute
path, which we don't do at the moment.

Which means we can't represent these frameworks in the Frameworks
group in the project, as they will have wrong paths and be shown
by Xcode as missing.
This commit is contained in:
Tor Arne Vestbø
2026-05-11 22:27:36 +02:00
committed by Brad King
parent 41f8011d61
commit b34e15a07d

View File

@@ -4326,7 +4326,8 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
}
if ((!libName.Target || libName.Target->IsImported()) &&
(isFramework || isXcFramework ||
IsLinkPhaseLibraryExtension(cleanPath))) {
IsLinkPhaseLibraryExtension(cleanPath)) &&
cmSystemTools::FileIsFullPath(cleanPath)) {
// Create file reference for embedding
auto it = this->ExternalLibRefs.find(cleanPath);
if (it == this->ExternalLibRefs.end()) {