xcode4: Fix missing link of sibling project with custom targetextension

When a node category cannot be determined by extension,
use the configuration kind when available.

Add unit test to illustrate the case.
This commit is contained in:
Renaud Guillard 2021-06-21 15:19:26 +02:00
parent e0af9ba2b2
commit 1ce82af4d9
2 changed files with 20 additions and 0 deletions

View File

@ -198,6 +198,24 @@
]] ]]
end end
function suite.PBXFrameworksBuildPhase_ListsDependencies_OnSharedLibWithTargetExtension()
kind "SharedLib"
targetextension ".plugin"
prepare()
xcode.PBXFrameworksBuildPhase(tr)
test.capture [[
/* Begin PBXFrameworksBuildPhase section */
9FDD37564328C0885DF98D96 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6B7205267D294518F2973366 /* libMyProject2-d.plugin in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
]]
end
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- PBXCopyFilesBuildPhaseForEmbedFrameworks tests -- PBXCopyFilesBuildPhaseForEmbedFrameworks tests
--------------------------------------------------------------------------- ---------------------------------------------------------------------------

View File

@ -46,6 +46,8 @@
} }
if node.isResource then if node.isResource then
return "Resources" return "Resources"
elseif node.cfg and (node.cfg.kind == p.SHAREDLIB or node.cfg.kind == p.STATICLIB) then
return "Frameworks"
end end
return categories[path.getextension(node.name)] return categories[path.getextension(node.name)]
end end