Last active
February 13, 2017 01:43
-
-
Save prikansaritual/dff6308e963357be02900683f2352122 to your computer and use it in GitHub Desktop.
premake modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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