Premake: Add include guard to make sure dependencies do not include themselves in an infinite chain when two components depend on each other

This commit is contained in:
Jan
2020-02-07 02:46:24 +01:00
parent 55d5746650
commit f73c27a7dc
21 changed files with 245 additions and 125 deletions

View File

@ -1,20 +1,24 @@
ObjCommon = {}
function ObjCommon:include()
ZoneCommon:include()
minizip:include()
includedirs {
path.join(ProjectFolder(), "ObjCommon")
}
if References:include("ObjCommon") then
ZoneCommon:include()
minizip:include()
includedirs {
path.join(ProjectFolder(), "ObjCommon")
}
end
end
function ObjCommon:link()
Utils:link()
ZoneCommon:link()
minizip:link()
links {
"ObjCommon"
}
if References:link("ObjCommon") then
Utils:link()
ZoneCommon:link()
minizip:link()
links {
"ObjCommon"
}
end
end
function ObjCommon:use()
@ -22,6 +26,7 @@ function ObjCommon:use()
end
function ObjCommon:project()
References:reset()
local folder = ProjectFolder();
project "ObjCommon"