TODO and added CXX pattern
[TODO] M4 [TODO] Protobuf
This commit is contained in:
parent
8244bd83c3
commit
fd3db14396
@ -12,6 +12,7 @@ function JsonProcessor(info)
|
||||
if (not info.name) then
|
||||
info.name = result.name
|
||||
end
|
||||
result.name = info.name
|
||||
|
||||
local translateDep = function(this, dep)
|
||||
if (this.info.translations) then
|
||||
@ -264,6 +265,23 @@ function JsonProcessor(info)
|
||||
|
||||
local isUtility = false
|
||||
|
||||
info.copy_build_files = {}
|
||||
|
||||
local function runCopies(prefix, rootPath, name)
|
||||
local referenceRoot = getroot() .. "/Build_UserScripts/" .. name .. "/"
|
||||
local referencePath = referenceRoot .. prefix
|
||||
local copyRoot = rootPath .. "/" .. prefix
|
||||
|
||||
info.copy_build_files[_G.path.getrelative(referencePath, path)] = prefix
|
||||
|
||||
if (not os.isfile(copyRoot)) then
|
||||
os.copyfile(referencePath, copyRoot)
|
||||
end
|
||||
end
|
||||
|
||||
forEach(result.unpack, runCopies, info.path, info.name)
|
||||
|
||||
|
||||
if (result.type:lower() == "aurora") then
|
||||
local srcPath = path .. "/Source"
|
||||
local incPath = path .. "/Include" -- /Source is emitted by design. Use it as a prefix in <> includes; eg, #include <Source/MyLib.hpp>
|
||||
@ -365,6 +383,20 @@ function JsonProcessor(info)
|
||||
}
|
||||
end
|
||||
|
||||
info.m4_files = {}
|
||||
|
||||
local addM4Defines = function(obj)
|
||||
if (not obj) then return end
|
||||
for fk, fv in pairs(obj) do
|
||||
local fileTbl = info.m4_files[fk] or {}
|
||||
info.m4_files[fk] = fileTbl
|
||||
|
||||
for k, v in pairs(fv) do
|
||||
fileTbl[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local processJsonBlock = function(object)
|
||||
forEach(object.features, handleFeature, info.path)
|
||||
forEach(object.sourcePaths, handleSourcePaths, info.path)
|
||||
@ -381,6 +413,9 @@ function JsonProcessor(info)
|
||||
forEach(object.clangIgnore, disablewarnings)
|
||||
end
|
||||
forEach(object.impInclude, handleUserJsonInclude, info.path, true)
|
||||
-- this is ran twice. i dont care
|
||||
forEach(object.unpack, runCopies, info.path, info.name)
|
||||
addM4Defines(object.m4Defines)
|
||||
end
|
||||
|
||||
function handleEval(object)
|
||||
|
@ -180,6 +180,7 @@ local boilerplateProject = function(name, projectType, src, inc, dest, root)
|
||||
path .. "/**.inl",
|
||||
path .. "/**.c",
|
||||
path .. "/**.cc",
|
||||
path .. "/**.cxx",
|
||||
path .. "/**.h",
|
||||
path .. "/**.masm" -- explicitly required
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user