From 69d936dfeed9ad45fe8192d5ff8454159af192ce Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 2 Apr 2015 18:16:20 +0200 Subject: [PATCH] skeleton for XCode support (nw) --- makefile | 7 +++++++ scripts/toolchain.lua | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/makefile b/makefile index 043111882f3..0ded6f9519e 100644 --- a/makefile +++ b/makefile @@ -769,6 +769,13 @@ macosx_x64_clang: generate $(PROJECTDIR)/gmake-osx-clang/Makefile macosx_x86_clang: generate $(PROJECTDIR)/gmake-osx-clang/Makefile $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)32 +xcode4: generate + $(SILENT) $(GENIE) $(PARAMS) --targetos=macosx --xcode=osx xcode4 + +xcode4-ios: generate + $(SILENT) $(GENIE) $(PARAMS) --targetos=macosx --xcode=ios xcode4 + + #------------------------------------------------- # Clean/bootstrap #------------------------------------------------- diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index f96c2982633..1aa3dbde462 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -48,6 +48,16 @@ newoption { }, } +newoption { + trigger = "xcode", + value = "xcode_target", + description = "Choose XCode target", + allowed = { + { "osx", "OSX" }, + { "ios", "iOS" }, + } +} + newoption { trigger = "with-android", value = "#", @@ -319,6 +329,16 @@ function toolchain(_buildDir, _subDir) if ("vs2013-xp") == _OPTIONS["vs"] then premake.vstudio.toolset = ("v120_xp") location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-xp") + end + elseif _ACTION == "xcode4" then + + if "osx" == _OPTIONS["xcode"] then + premake.xcode.toolset = "macosx" + location (path.join(_buildDir, "projects", _ACTION .. "-osx")) + + elseif "ios" == _OPTIONS["xcode"] then + premake.xcode.toolset = "iphoneos" + location (path.join(_buildDir, "projects", _ACTION .. "-ios")) end end