Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
premake modules
function appendToTable(t1, t2)
for k,v in ipairs(t2) do
table.insert(t1, v)
end
return t1
end
function initSoln(solnname, corepath, variant)
solnname.srcfiles = {}
solnname.includepaths = {}
solnname.linklibs = {}
solnname.libdirpaths = {}
solnname.buildoptions = {}
-- paths you would want all modules to have
common_includepaths = { corepath .. "path1",
}
end
function addCompToSoln(solnname, comppath)
compfile = comppath .. "/premake4.lua"
default_path = comppath
dofile(compfile)
appendToTable(solnname.srcfiles, default.srcfiles)
appendToTable(solnname.includepaths, default.includepaths)
appendToTable(solnname.linklibs, default.linklibs)
appendToTable(solnname.libdirpaths, default.libdirpaths)
appendToTable(solnname.buildoptions, default.buildoptions)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment