Add check to Xcode action to prevent multiple target kinds per project (not supported by Xcode)
This commit is contained in:
parent
f1e5457752
commit
b65bf6111a
@ -39,4 +39,15 @@
|
||||
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,
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
--
|
||||
-- Performs a sanity check all all of the solutions and projects
|
||||
-- Performs a sanity check of all of the solutions and projects
|
||||
-- in the session to be sure they meet some minimum requirements.
|
||||
--
|
||||
|
||||
@ -54,6 +54,12 @@
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- some actions have custom validation logic
|
||||
if action.oncheckproject then
|
||||
action.oncheckproject(prj)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
return true
|
||||
|
Reference in New Issue
Block a user