Added project dependencies to PBXFrameworksBuildPhase
This commit is contained in:
parent
992eec33ab
commit
7e5e63d2dd
@ -297,19 +297,28 @@
|
||||
|
||||
function xcode.PBXFrameworksBuildPhase(tr)
|
||||
_p('/* Begin PBXFrameworksBuildPhase section */')
|
||||
for _, node in ipairs(tr.products.children) do
|
||||
_p(2,'%s /* Frameworks */ = {', node.fxstageid)
|
||||
_p(3,'isa = PBXFrameworksBuildPhase;')
|
||||
_p(3,'buildActionMask = 2147483647;')
|
||||
_p(3,'files = (')
|
||||
for _, link in ipairs(node.cfg.links) do
|
||||
local fxnode = tr.frameworks.children[path.getname(link)]
|
||||
_p(4,'%s /* %s in Frameworks */,', fxnode.buildid, fxnode.name)
|
||||
_p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid)
|
||||
_p(3,'isa = PBXFrameworksBuildPhase;')
|
||||
_p(3,'buildActionMask = 2147483647;')
|
||||
_p(3,'files = (')
|
||||
|
||||
-- write out library dependencies
|
||||
tree.traverse(tr.frameworks, {
|
||||
onleaf = function(node)
|
||||
_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)
|
||||
end
|
||||
_p(3,');')
|
||||
_p(3,'runOnlyForDeploymentPostprocessing = 0;')
|
||||
_p(2,'};')
|
||||
end
|
||||
})
|
||||
|
||||
-- write out project dependencies
|
||||
tree.traverse(tr.projects, {
|
||||
onleaf = function(node)
|
||||
_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)
|
||||
end
|
||||
})
|
||||
|
||||
_p(3,');')
|
||||
_p(3,'runOnlyForDeploymentPostprocessing = 0;')
|
||||
_p(2,'};')
|
||||
_p('/* End PBXFrameworksBuildPhase section */')
|
||||
_p('')
|
||||
end
|
||||
|
@ -88,7 +88,7 @@
|
||||
xcnode.targetproxyid = xcode.newid(xcnode, "targprox")
|
||||
|
||||
-- create a grandchild node for the dependency's link target
|
||||
local cfg = premake.getconfig(dep, prj.solution.configurations[1])
|
||||
local cfg = premake.getconfig(dep, prj.configurations[1])
|
||||
node = tree.insert(xcnode, tree.new(cfg.linktarget.name))
|
||||
node.path = cfg.linktarget.fullpath
|
||||
end
|
||||
|
@ -93,3 +93,25 @@
|
||||
/* End PBXFileReference section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- PBXFrameworksBuildPhase tests
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
function suite.PBXFrameworksBuildPhase_ListsDependencies()
|
||||
prepare()
|
||||
xcode.PBXFrameworksBuildPhase(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
[MyProject:fxs] /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
[libMyProject2-d.a:build] /* libMyProject2-d.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
]]
|
||||
end
|
||||
|
Reference in New Issue
Block a user