Build/Features/guess-platform-code.lua

102 lines
2.7 KiB
Lua
Raw Normal View History

local function feature()
local function excludeFiles(name, noFiles, strict)
if (not noFiles) then
if (strict) then
excludes("**/*." .. name .. ".masm")
excludes("**/*." .. name .. ".*")
else
excludes("**/*" .. name .. ".masm")
excludes("**/*" .. name .. ".*")
end
end
excludes("**/" .. name .. "/**")
end
auFilter(auFilterOf({notPlatforms = {"win32"}, notArchs = {"x86_64"}}))
excludeFiles "win64"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notPlatforms = {"win32"}}))
excludeFiles "windows"
excludeFiles "win32"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notPlatforms = {"xbox"}}))
excludeFiles "xbox"
--if (not _G["uwp"]) then
excludeFiles "uwp"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notPlatforms = {"win32", "xbox"}}))
excludeFiles("nt", false, true)
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notPlatforms = {"android"}}))
excludeFiles "android"
2022-03-06 18:03:56 +00:00
auFilter{}
local isNotApple = {"mac",
"ios"}
local isNotBsd = auConcatArrays({"bsd",
"ps4",
"ps5"}, isNotApple)
auFilter(auFilterOf({notPlatforms = isNotBsd}))
excludeFiles "bsd"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notPlatforms = isNotApple}))
excludeFiles "apple"
excludeFiles "xnu"
excludeFiles "darwin"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notPlatforms = {"mac"}}))
excludeFiles "osx"
excludeFiles "macos"
2022-03-06 18:03:56 +00:00
auFilter{}
local isNotLinux = {"linux",
"android"}
auFilter(auFilterOf({notPlatforms = auConcatArrays(isNotBsd, isNotLinux)}))
excludeFiles "unix"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notPlatforms = {"linux", "android"}}))
excludeFiles "linux"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notArchs = "x86_64"}))
excludeFiles "x64"
excludeFiles "x86_64"
excludeFiles "amd64"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notArchs = "x86_32"}))
excludes "**/x86/**"
excludes "**/x86/**.c"
excludes "**/x86/**.h"
excludes "**/x86/**.*pp"
excludes "**/x86/**.masm"
excludes "**/x86/**.inl"
excludes "**/x86/**.cpp"
excludes "**/*.x86.*pp"
excludeFiles "x86_32"
excludeFiles "intel"
auFilter{}
2022-03-06 18:03:56 +00:00
auFilter(auFilterOf({notArchs = "arm"}))
excludeFiles ("arm", true)
excludeFiles "aarch64"
excludeFiles "aarch"
auFilter{}
excludeFiles "mips"
excludeFiles "mips64"
excludeFiles "amiga"
excludeFiles "powerpc"
excludeFiles "riscv"
end
return feature