Skip to content
This repository was archived by the owner on Jun 2, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _preload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
kind = "list",
}

p.api.register {
name = "xcodeweakframeworks",
scope = "config",
kind = "list",
}

--
-- Register the Xcode exporters.
Expand Down
9 changes: 7 additions & 2 deletions xcode_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,13 @@
onnode = function(node)
if node.buildid then
settings[node.buildid] = function(level)
_p(level,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };',
node.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)
if node.isWeak then
_p(level,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; settings = {ATTRIBUTES = (Weak, ); }; };',
node.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)
else
_p(level,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };',
node.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)
end
end
end
end
Expand Down
1 change: 1 addition & 0 deletions xcode_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
if xcode.isframework(name) and not tr.frameworks.children[name] then
node = tree.insert(tr.frameworks, tree.new(name))
node.path = link
node.isWeak = (cfg.xcodeweakframeworks or {})[name]
end
end
end
Expand Down