diff options
author | 2016-11-02 08:36:07 +0100 | |
---|---|---|
committer | 2016-11-02 08:36:07 +0100 | |
commit | 6c390127c2fcd0bfeef0ff01cbf55a12fd1a2922 (patch) | |
tree | 1d7ec90b0c1796c900a1cc98911926610a1e75e9 /3rdparty/genie/src/actions/xcode/xcode_project.lua | |
parent | 7fc31a0776473664273c399ae4d36c4c9884f1b2 (diff) |
Update to latest GENie (nw)
Diffstat (limited to '3rdparty/genie/src/actions/xcode/xcode_project.lua')
-rw-r--r-- | 3rdparty/genie/src/actions/xcode/xcode_project.lua | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/3rdparty/genie/src/actions/xcode/xcode_project.lua b/3rdparty/genie/src/actions/xcode/xcode_project.lua index 8c6e9646dc0..5a54d53ff5c 100644 --- a/3rdparty/genie/src/actions/xcode/xcode_project.lua +++ b/3rdparty/genie/src/actions/xcode/xcode_project.lua @@ -18,8 +18,8 @@ -- function xcode.buildprjtree(prj) - local tr = premake.project.buildsourcetree(prj) - + local tr = premake.project.buildsourcetree(prj, true) + -- create a list of build configurations and assign IDs tr.configs = {} for _, cfgname in ipairs(prj.solution.configurations) do @@ -31,14 +31,14 @@ table.insert(tr.configs, cfg) end end - + -- convert localized resources from their filesystem layout (English.lproj/MainMenu.xib) -- to Xcode's display layout (MainMenu.xib/English). tree.traverse(tr, { onbranch = function(node) if path.getextension(node.name) == ".lproj" then local lang = path.getbasename(node.name) -- "English", "French", etc. - + -- create a new language group for each file it contains for _, filenode in ipairs(node.children) do local grpnode = node.parent.children[filenode.name] @@ -46,18 +46,18 @@ grpnode = tree.insert(node.parent, tree.new(filenode.name)) grpnode.kind = "vgroup" end - + -- convert the file node to a language node and add to the group filenode.name = path.getbasename(lang) tree.insert(grpnode, filenode) end - + -- remove this directory from the tree tree.remove(node) end end }) - + -- fix .xcassets files, they should be treated as a file, not a folder tree.traverse(tr, { onbranch = function(node) @@ -66,7 +66,7 @@ end end }) - + -- the special folder "Frameworks" lists all linked frameworks tr.frameworks = tree.new("Frameworks") for cfg in premake.eachconfig(prj) do @@ -78,12 +78,12 @@ end end end - + -- only add it to the tree if there are frameworks to link - if #tr.frameworks.children > 0 then + if #tr.frameworks.children > 0 then tree.insert(tr, tr.frameworks) end - + -- the special folder "Products" holds the target produced by the project; this -- is populated below tr.products = tree.insert(tr, tree.new("Products")) @@ -100,7 +100,7 @@ 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]) node = tree.insert(xcnode, tree.new(cfg.linktarget.name)) @@ -117,7 +117,7 @@ onnode = function(node) -- assign IDs to every node in the tree node.id = xcode.newid(node) - + -- assign build IDs to buildable files if xcode.getbuildcategory(node) then node.buildid = xcode.newid(node, "build") @@ -126,7 +126,7 @@ -- remember key files that are needed elsewhere if string.endswith(node.name, "Info.plist") then tr.infoplist = node - end + end if string.endswith(node.name, ".entitlements") then tr.entitlements = node end @@ -171,7 +171,7 @@ xcode.PBXSourcesBuildPhase(tr,prj) xcode.PBXVariantGroup(tr) xcode.PBXTargetDependency(tr) - xcode.XCBuildConfiguration(tr) + xcode.XCBuildConfiguration(tr, prj) xcode.XCBuildConfigurationList(tr) xcode.Footer(tr) end |