Browse Source

added Xcode target selection between iOS or OS X

Attila Kocsis 11 years ago
parent
commit
505c85bc49
1 changed files with 23 additions and 1 deletions
  1. 23 1
      scripts/toolchain.lua

+ 23 - 1
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 {
 	newoption {
 		trigger = "with-android",
 		trigger = "with-android",
 		value   = "#",
 		value   = "#",
@@ -280,6 +291,17 @@ function toolchain(_buildDir, _libDir)
 			platforms { "ARM" }
 			platforms { "ARM" }
 			location (_buildDir .. "projects/" .. _ACTION .. "-winphone81")
 			location (_buildDir .. "projects/" .. _ACTION .. "-winphone81")
 		end
 		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
 	end
 
 
 	flags {
 	flags {
@@ -740,7 +762,7 @@ function toolchain(_buildDir, _libDir)
 		}
 		}
 		includedirs { bxDir .. "include/compat/osx" }
 		includedirs { bxDir .. "include/compat/osx" }
 
 
-	configuration { "ios-*" }
+	configuration { "ios*" }
 		linkoptions {
 		linkoptions {
 			"-lc++",
 			"-lc++",
 		}
 		}