fix options.os and os.systemTags for ios suppot

This commit is contained in:
tempura-sukiyaki 2018-10-18 21:13:56 +09:00
parent 5cffdc4f6b
commit d269416923
3 changed files with 7 additions and 24 deletions

View File

@ -6,25 +6,6 @@
local p = premake
--
-- Register the ios extension
--
local osoption = p.option.get("os")
if type(osoption) == "table" then
local ios = false
table.foreachi(osoption.allowed, function(allowed)
ios = ios or allowed[1] == "ios"
end)
if not ios then
table.insert(osoption.allowed, { "ios", "iOS" })
end
end
-- add system tags for ios.
if not os.systemTags[p.IOS] then
os.systemTags[p.IOS] = { "ios", "mobile" }
end
--
-- Register new Xcode-specific project fields.

View File

@ -1695,6 +1695,7 @@
{ "bsd", "OpenBSD, NetBSD, or FreeBSD" },
{ "haiku", "Haiku" },
{ "hurd", "GNU/Hurd" },
{ "ios", "iOS" },
{ "linux", "Linux" },
{ "macosx", "Apple Mac OS X" },
{ "solaris", "Solaris" },
@ -1761,17 +1762,17 @@
-- Add variations for other Posix-like systems.
filter { "system:macosx or ios", "kind:WindowedApp" }
filter { "system:darwin", "kind:WindowedApp" }
targetextension ".app"
filter { "system:macosx or ios", "kind:SharedLib" }
filter { "system:darwin", "kind:SharedLib" }
targetextension ".dylib"
filter { "system:macosx or ios", "kind:SharedLib", "sharedlibtype:OSXBundle" }
filter { "system:darwin", "kind:SharedLib", "sharedlibtype:OSXBundle" }
targetprefix ""
targetextension ".bundle"
filter { "system:macosx or ios", "kind:SharedLib", "sharedlibtype:OSXFramework" }
filter { "system:darwin", "kind:SharedLib", "sharedlibtype:OSXFramework" }
targetprefix ""
targetextension ".framework"
@ -1797,7 +1798,7 @@
filter { "kind:SharedLib", "system:not Windows" }
pic "On"
filter { "system:macosx or ios" }
filter { "system:darwin" }
toolset "clang"
filter {}

View File

@ -734,6 +734,7 @@
["aix"] = { "aix", "posix" },
["bsd"] = { "bsd", "posix" },
["haiku"] = { "haiku", "posix" },
["ios"] = { "ios", "darwin", "posix", "mobile" },
["linux"] = { "linux", "posix" },
["macosx"] = { "macosx", "darwin", "posix" },
["solaris"] = { "solaris", "posix" },