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,17 +1,23 @@
ZoneCommon = {}
function ZoneCommon:include()
Utils:include()
includedirs {
path.join(ProjectFolder(), "ZoneCommon")
}
if References:include("ZoneCommon") then
Utils:include()
ObjCommon:include()
includedirs {
path.join(ProjectFolder(), "ZoneCommon")
}
end
end
function ZoneCommon:link()
Utils:link()
links {
"ZoneCommon"
}
if References:link("ZoneCommon") then
Utils:link()
ObjCommon:link()
links {
"ZoneCommon"
}
end
end
function ZoneCommon:use()
@ -19,6 +25,7 @@ function ZoneCommon:use()
end
function ZoneCommon:project()
References:reset()
local folder = ProjectFolder();
project "ZoneCommon"