diff options
author | 2015-03-20 08:27:31 +0100 | |
---|---|---|
committer | 2015-03-20 08:27:31 +0100 | |
commit | efc8fa579e9e6e1658f35563e85729f602098cd8 (patch) | |
tree | cdba409969c8838064563adf2b692f2719ff5ee5 /3rdparty/genie/src/base/api.lua | |
parent | e9aaed8b864177ba58a4ec54c77bcb3bc536e331 (diff) |
updated genie (nw)
Diffstat (limited to '3rdparty/genie/src/base/api.lua')
-rw-r--r-- | 3rdparty/genie/src/base/api.lua | 126 |
1 files changed, 66 insertions, 60 deletions
diff --git a/3rdparty/genie/src/base/api.lua b/3rdparty/genie/src/base/api.lua index 86665e4f928..9a3a26d0c43 100644 --- a/3rdparty/genie/src/base/api.lua +++ b/3rdparty/genie/src/base/api.lua @@ -17,7 +17,7 @@ kind = "string", scope = "config", }, - + basedir = { kind = "path", @@ -47,19 +47,19 @@ kind = "list", scope = "config", }, - + buildoptions_cpp = { kind = "list", scope = "config", }, - + buildoptions_objc = { kind = "list", scope = "config", }, - + configurations = { kind = "list", @@ -109,6 +109,12 @@ scope = "config", }, + removefiles = + { + kind = "filelist", + scope = "config", + }, + flags = { kind = "list", @@ -189,7 +195,7 @@ } }, - forcedincludes = + forcedincludes = { kind = "absolutefilelist", scope = "config", @@ -305,7 +311,7 @@ kind = "list", scope = "config", }, - + messageskip = { @@ -335,31 +341,31 @@ { kind = "string", scope = "config", - }, + }, msgcompile = { kind = "string", scope = "config", - }, + }, msgcompile_objc = { kind = "string", scope = "config", - }, - + }, + msgresource = { kind = "string", scope = "config", - }, + }, msglinking = { kind = "string", scope = "config", - }, + }, objdir = { @@ -536,7 +542,7 @@ premake.check_paths = false - + -- -- Check to see if a value exists in a list of values, using a -- case-insensitive match. If the value does exist, the canonical @@ -640,7 +646,7 @@ if value then add(value, 5) end - + return obj[fieldname] end @@ -664,7 +670,7 @@ if value:find("*") then local arr = matchfunc(value); if (premake.check_paths) and (#arr == 0) then - error("Can't find matching files for pattern :" .. value) + error("Can't find matching files for pattern :" .. value) end makeabsolute(arr, depth + 1) else @@ -770,7 +776,7 @@ end end - -- find the container for the value + -- find the container for the value local container, err = premake.getobject(scope) if (not container) then error(err, 3) @@ -804,10 +810,10 @@ end -- list value types get a remove() call too - if info.kind == "list" or - info.kind == "dirlist" or + if info.kind == "list" or + info.kind == "dirlist" or info.kind == "filelist" or - info.kind == "absolutefilelist" + info.kind == "absolutefilelist" then _G["remove"..name] = function(value) premake.remove(name, value) @@ -895,7 +901,7 @@ -- the path to create groups from (i.e. "Examples/Simple") -- @param sln -- the solution to add the groups to --- @returns +-- @returns -- the group object for the deepest folder -- @@ -960,7 +966,7 @@ prj.basedir = os.getcwd() prj.uuid = os.uuid(prj.name) prj.blocks = { } - prj.usage = isUsage + prj.usage = isUsage prj.group = group return prj; @@ -985,46 +991,46 @@ error("no active solution", 2) end - -- if this is a new project, or the project in that slot doesn't have a usage, create it - if((not sln.projects[name]) or - ((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then - premake.CurrentContainer = createproject(name, sln, true) - else - premake.CurrentContainer = iff(sln.projects[name].usage, - sln.projects[name], sln.projects[name].usageProj) - end - - -- add an empty, global configuration to the project - configuration { } - - return premake.CurrentContainer - end - - function project(name) - if (not name) then - --Only return non-usage projects - if(type(premake.CurrentContainer) ~= "project") then return nil end - if(premake.CurrentContainer.usage) then return nil end - return premake.CurrentContainer + -- if this is a new project, or the project in that slot doesn't have a usage, create it + if((not sln.projects[name]) or + ((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then + premake.CurrentContainer = createproject(name, sln, true) + else + premake.CurrentContainer = iff(sln.projects[name].usage, + sln.projects[name], sln.projects[name].usageProj) end - -- identify the parent solution - local sln - if (type(premake.CurrentContainer) == "project") then - sln = premake.CurrentContainer.solution - else - sln = premake.CurrentContainer - end - if (type(sln) ~= "solution") then - error("no active solution", 2) - end - - -- if this is a new project, or the old project is a usage project, create it - if((not sln.projects[name]) or sln.projects[name].usage) then - premake.CurrentContainer = createproject(name, sln) - else - premake.CurrentContainer = sln.projects[name]; - end + -- add an empty, global configuration to the project + configuration { } + + return premake.CurrentContainer + end + + function project(name) + if (not name) then + --Only return non-usage projects + if(type(premake.CurrentContainer) ~= "project") then return nil end + if(premake.CurrentContainer.usage) then return nil end + return premake.CurrentContainer + end + + -- identify the parent solution + local sln + if (type(premake.CurrentContainer) == "project") then + sln = premake.CurrentContainer.solution + else + sln = premake.CurrentContainer + end + if (type(sln) ~= "solution") then + error("no active solution", 2) + end + + -- if this is a new project, or the old project is a usage project, create it + if((not sln.projects[name]) or sln.projects[name].usage) then + premake.CurrentContainer = createproject(name, sln) + else + premake.CurrentContainer = sln.projects[name]; + end -- add an empty, global configuration to the project configuration { } @@ -1055,7 +1061,7 @@ function group(name) - if not name then + if not name then return premake.CurrentGroup end premake.CurrentGroup = name |