From 505c85bc49f05c516b7c59a6fcf82ece71665380 Mon Sep 17 00:00:00 2001 From: Attila Kocsis Date: Wed, 14 Jan 2015 19:44:42 +0100 Subject: [PATCH] added Xcode target selection between iOS or OS X --- scripts/toolchain.lua | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 61a33ff..9faaaaf 100755 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -45,6 +45,17 @@ function toolchain(_buildDir, _libDir) }, } + + newoption { + trigger = "xcode", + value = "xcode_target", + description = "Choose XCode target", + allowed = { + { "osx", "OSX" }, + { "ios", "iOS" }, + } + } + newoption { trigger = "with-android", value = "#", @@ -280,6 +291,17 @@ function toolchain(_buildDir, _libDir) platforms { "ARM" } location (_buildDir .. "projects/" .. _ACTION .. "-winphone81") end + elseif _ACTION == "xcode4" then + + if "osx" == _OPTIONS["xcode"] then + location (_buildDir .. "projects/" .. _ACTION .. "-osx") + end + + if "ios" == _OPTIONS["xcode"] then + location (_buildDir .. "projects/" .. _ACTION .. "-ios") + end + + end flags { @@ -740,7 +762,7 @@ function toolchain(_buildDir, _libDir) } includedirs { bxDir .. "include/compat/osx" } - configuration { "ios-*" } + configuration { "ios*" } linkoptions { "-lc++", }