Build/Features/guess-platform-code.lua
Reece 615bcb53b9 Initial commit
Publish a collection of boilerplate and an additional json parser.
This meta build chain as-is should replace a lot of the premake5.lua in the AuroraEngine repo
2021-05-20 13:56:44 +01:00

70 lines
1.7 KiB
Lua

local feature = function()
local readdPattern = function(pattern)
files (getProjectInfo(getCurrentProjectName()).path + "/" + pattern)
end
local readd = function(name)
readdPattern "**/" .. name .. "/**.c"
readdPattern "**/" .. name .. "/**.*pp"
readdPattern "**/" .. name .. "/**.masm"
readdPattern "**/" .. name .. "/**.inl"
readdPattern "**/" .. name .. "/**.h"
readdPattern "**/*." .. name .. ".cc"
readdPattern "**/*." .. name .. ".c"
readdPattern "**/*." .. name .. ".h"
readdPattern "**/*." .. name .. ".*pp"
readdPattern "**/*." .. name .. ".masm"
readdPattern "**/*." .. name .. ".inl"
end
if (_G["target-win32"]) then
if (_G["target-x86_64"]) then
readd "win64"
end
readd "win32"
readd "windows"
end
if (_G["target-linux"]) then
readd "linux"
end
if (_G["target-mac"]) then
readd "macos"
readd "mac"
readd "apple"
end
if (_G["target-ios"]) then
readd "apple"
readd "ios"
end
if (_G["target-x86_64"]) then
readd "x64"
readd "x86_64"
readd "amd64"
end
if (_G["target-x86_32"]) then
readdPattern "**/x86/**"
readdPattern "**/x86/**.c"
readdPattern "**/x86/**.h"
readdPattern "**/x86/**.*pp"
readdPattern "**/x86/**.masm"
readdPattern "**/x86/**.inl"
readdPattern "**/x86/**.cpp"
readdPattern "**/*.x86.*pp"
readd "x86_32"
readd "intel"
end
if (_G["target-arm"]) then
readd "arm"
readd "aarch64"
readd "aarch"
end
end
return feature