summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/genie/src/actions/xcode/_xcode.lua
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/genie/src/actions/xcode/_xcode.lua')
-rw-r--r--3rdparty/genie/src/actions/xcode/_xcode.lua102
1 files changed, 51 insertions, 51 deletions
diff --git a/3rdparty/genie/src/actions/xcode/_xcode.lua b/3rdparty/genie/src/actions/xcode/_xcode.lua
index 588af2a65a0..27e556c1a5f 100644
--- a/3rdparty/genie/src/actions/xcode/_xcode.lua
+++ b/3rdparty/genie/src/actions/xcode/_xcode.lua
@@ -5,14 +5,34 @@
--
premake.xcode = { }
+ premake.xcode.xcode6 = { }
+
+
+--
+-- Verify only single target kind for Xcode project
+--
+-- @param prj
+-- Project to be analyzed
+--
+
+ local function checkproject(prj)
+ -- Xcode can't mix target kinds within a project
+ local last
+ for cfg in premake.eachconfig(prj) do
+ if last and last ~= cfg.kind then
+ error("Project '" .. prj.name .. "' uses more than one target kind; not supported by Xcode", 0)
+ end
+ last = cfg.kind
+ end
+ end
--
-- Set default toolset
--
premake.xcode.toolset = "macosx"
-
- newaction
+
+ newaction
{
trigger = "xcode3",
shortname = "Xcode 3",
@@ -20,50 +40,41 @@
os = "macosx",
valid_kinds = { "ConsoleApp", "WindowedApp", "SharedLib", "StaticLib" },
-
+
valid_languages = { "C", "C++" },
-
+
valid_tools = {
cc = { "gcc" },
},
- valid_platforms = {
- Native = "Native",
- x32 = "Native 32-bit",
- x64 = "Native 64-bit",
- Universal32 = "32-bit Universal",
- Universal64 = "64-bit Universal",
+ valid_platforms = {
+ Native = "Native",
+ x32 = "Native 32-bit",
+ x64 = "Native 64-bit",
+ Universal32 = "32-bit Universal",
+ Universal64 = "64-bit Universal",
Universal = "Universal",
},
-
+
default_platform = "Universal",
-
+
onsolution = function(sln)
-- Assign IDs needed for inter-project dependencies
premake.xcode.preparesolution(sln)
end,
-
+
onproject = function(prj)
premake.generate(prj, "%%.xcodeproj/project.pbxproj", premake.xcode.project)
end,
-
+
oncleanproject = function(prj)
premake.clean.directory(prj, "%%.xcodeproj")
end,
-
- oncheckproject = function(prj)
- -- Xcode can't mix target kinds within a project
- local last
- for cfg in premake.eachconfig(prj) do
- if last and last ~= cfg.kind then
- error("Project '" .. prj.name .. "' uses more than one target kind; not supported by Xcode", 0)
- end
- last = cfg.kind
- end
- end,
+
+ oncheckproject = checkproject,
}
- newaction
+ newaction
{
trigger = "xcode4",
shortname = "Xcode 4",
@@ -71,47 +82,36 @@
os = "macosx",
valid_kinds = { "ConsoleApp", "WindowedApp", "SharedLib", "StaticLib" },
-
+
valid_languages = { "C", "C++" },
-
+
valid_tools = {
cc = { "gcc" },
},
- valid_platforms = {
- Native = "Native",
- x32 = "Native 32-bit",
- x64 = "Native 64-bit",
- Universal32 = "32-bit Universal",
- Universal64 = "64-bit Universal",
+ valid_platforms = {
+ Native = "Native",
+ x32 = "Native 32-bit",
+ x64 = "Native 64-bit",
+ Universal32 = "32-bit Universal",
+ Universal64 = "64-bit Universal",
Universal = "Universal",
},
-
+
default_platform = "Universal",
-
+
onsolution = function(sln)
premake.generate(sln, "%%.xcworkspace/contents.xcworkspacedata", premake.xcode4.workspace_generate)
end,
-
+
onproject = function(prj)
premake.generate(prj, "%%.xcodeproj/project.pbxproj", premake.xcode.project)
end,
-
+
oncleanproject = function(prj)
premake.clean.directory(prj, "%%.xcodeproj")
premake.clean.directory(prj, "%%.xcworkspace")
end,
-
- oncheckproject = function(prj)
- -- Xcode can't mix target kinds within a project
- local last
- for cfg in premake.eachconfig(prj) do
- if last and last ~= cfg.kind then
- error("Project '" .. prj.name .. "' uses more than one target kind; not supported by Xcode", 0)
- end
- last = cfg.kind
- end
- end,
- }
-
+ oncheckproject = checkproject,
+ }