Added project dependencies to PBXNativeTarget
This commit is contained in:
parent
776f833413
commit
ac4b428099
@ -387,8 +387,13 @@
|
||||
_p(3,');')
|
||||
_p(3,'buildRules = (')
|
||||
_p(3,');')
|
||||
|
||||
_p(3,'dependencies = (')
|
||||
for _, node in ipairs(tr.projects.children) do
|
||||
_p(4,'%s /* PBXTargetDependency */,', node.targetdependid)
|
||||
end
|
||||
_p(3,');')
|
||||
|
||||
_p(3,'name = %s;', name)
|
||||
|
||||
local p
|
||||
|
@ -87,6 +87,7 @@
|
||||
xcnode.productgroupid = xcode.newid(xcnode, "prodgrp")
|
||||
xcnode.productproxyid = xcode.newid(xcnode, "prodprox")
|
||||
xcnode.targetproxyid = xcode.newid(xcnode, "targprox")
|
||||
xcnode.targetdependid = xcode.newid(xcnode, "targdep")
|
||||
|
||||
-- create a grandchild node for the dependency's link target
|
||||
local cfg = premake.getconfig(dep, prj.configurations[1])
|
||||
|
@ -163,3 +163,36 @@
|
||||
/* End PBXGroup section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- PBXNativeTarget tests
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
function suite.PBXNativeTarget_ListsDependencies()
|
||||
prepare()
|
||||
xcode.PBXNativeTarget(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXNativeTarget section */
|
||||
[MyProject:target] /* MyProject */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = [MyProject:cfg] /* Build configuration list for PBXNativeTarget "MyProject" */;
|
||||
buildPhases = (
|
||||
[MyProject:rez] /* Resources */,
|
||||
[MyProject:src] /* Sources */,
|
||||
[MyProject:fxs] /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
[MyProject2.xcodeproj:targdep] /* PBXTargetDependency */,
|
||||
);
|
||||
name = MyProject;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = MyProject;
|
||||
productReference = [MyProject:product] /* MyProject */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
]]
|
||||
end
|
||||
|
Reference in New Issue
Block a user