Added Ben Henning's GSoC2013 work: premake build system.
3 # Date 1376606083 25200
4 # Thu Aug 15 15:34:43 2013 -0700
5 # Node ID 8c9cd352c70012a64779356bff3c81998c3fb6a0
6 # Parent e8558df4fbdb173a2b9ed0d354d6c3e76b376698
7 Implemented the option to set custom source trees for Xcode frameworks (links)
8 using Visual Studio-esque variables, such as "$(SDKROOT)/OpenGLES.framework".
10 diff --git a/src/actions/xcode/xcode_common.lua b/src/actions/xcode/xcode_common.lua
11 --- a/src/actions/xcode/xcode_common.lua
12 +++ b/src/actions/xcode/xcode_common.lua
15 if xcode.isframework(node.path) then
16 --respect user supplied paths
17 - if string.find(node.path,'/') then
18 - if string.find(node.path,'^%.')then
19 + -- look for special variable-starting paths for different sources
20 + local nodePath = node.path
21 + local _, matchEnd, variable = string.find(nodePath, "^%$%((.+)%)/")
23 + -- by skipping the last '/' we support the same absolute/relative
25 + nodePath = string.sub(nodePath, matchEnd + 1)
27 + if string.find(nodePath,'/') then
28 + if string.find(nodePath,'^%.')then
29 error('relative paths are not currently supported for frameworks')
34 - pth = "/System/Library/Frameworks/" .. node.path
35 + pth = "/System/Library/Frameworks/" .. nodePath
38 + -- if it starts with a variable, use that as the src instead
41 + -- if we are using a different source tree, it has to be relative
42 + -- to that source tree, so get rid of any leading '/'
43 + if string.find(pth, '^/') then
44 + pth = string.sub(pth, 2)
50 -- something else; probably a source code file
54 -- if the parent node is virtual, it won't have a local path
55 -- of its own; need to use full relative path from project
60 - _p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = "%s"; path = "%s"; sourceTree = "<%s>"; };',
61 + _p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = "%s"; path = "%s"; sourceTree = "%s"; };',
62 node.id, node.name, xcode.getfiletype(node), node.name, pth, src)