From d269416923ba8f5e90dcfbaeeea851606c8f034c Mon Sep 17 00:00:00 2001 From: tempura-sukiyaki <10625603+tempura-sukiyaki@users.noreply.github.com> Date: Thu, 18 Oct 2018 21:13:56 +0900 Subject: [PATCH] fix `options.os` and `os.systemTags` for ios suppot --- modules/xcode/_preload.lua | 19 ------------------- src/_premake_init.lua | 11 ++++++----- src/base/os.lua | 1 + 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/modules/xcode/_preload.lua b/modules/xcode/_preload.lua index 9107dd7b..06dec3fb 100644 --- a/modules/xcode/_preload.lua +++ b/modules/xcode/_preload.lua @@ -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. diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 71fe5f9e..66f25867 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -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 {} diff --git a/src/base/os.lua b/src/base/os.lua index 7c4996ce..b0c82a81 100644 --- a/src/base/os.lua +++ b/src/base/os.lua @@ -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" },