Added PBXTargetDependency section

This commit is contained in:
starkos 2009-11-29 15:37:39 +00:00
parent 70349b3bdd
commit 00709e1074
3 changed files with 40 additions and 0 deletions

View File

@ -249,6 +249,7 @@
_p(2,'};')
end
_p('/* End PBXContainerItemProxy section */')
_p('')
end
end
@ -466,6 +467,7 @@
end
})
_p('/* End PBXReferenceProxy section */')
_p('')
end
end
@ -539,6 +541,24 @@
end
function xcode.PBXTargetDependency(tr)
if #tr.projects.children > 0 then
_p('/* Begin PBXTargetDependency section */')
tree.traverse(tr.projects, {
onleaf = function(node)
_p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid)
_p(3,'isa = PBXTargetDependency;')
_p(3,'name = "%s";', node.name)
_p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid)
_p(2,'};')
end
})
_p('/* End PBXTargetDependency section */')
_p('')
end
end
function xcode.XCBuildConfiguration_Target(tr, target, cfg)
_p(2,'%s /* %s */ = {', tr.configs[cfg.name].targetid, cfg.name)
_p(3,'isa = XCBuildConfiguration;')

View File

@ -154,6 +154,7 @@
xcode.PBXResourcesBuildPhase(tr)
xcode.PBXSourcesBuildPhase(tr)
xcode.PBXVariantGroup(tr)
xcode.PBXTargetDependency(tr)
xcode.XCBuildConfiguration(tr)
xcode.XCBuildConfigurationList(tr)
xcode.Footer(tr)

View File

@ -249,3 +249,22 @@
/* End PBXReferenceProxy section */
]]
end
---------------------------------------------------------------------------
-- PBXTargetDependency tests
---------------------------------------------------------------------------
function suite.PBXTargetDependency_ListsDependencies()
prepare()
xcode.PBXTargetDependency(tr)
test.capture [[
/* Begin PBXTargetDependency section */
[MyProject2.xcodeproj:targdep] /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libMyProject2-d.a";
targetProxy = [MyProject2.xcodeproj:targprox] /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
]]
end