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

20
thirdparty/zlib.lua vendored
View File

@ -1,18 +1,21 @@
zlib = {}
function zlib:include()
if References:include("zlib") then
defines {
"ZLIB_CONST"
}
defines {
"ZLIB_CONST"
}
includedirs {
path.join(ThirdPartyFolder(), "zlib")
}
includedirs {
path.join(ThirdPartyFolder(), "zlib")
}
end
end
function zlib:link()
links "zlib"
if References:link("zlib") then
links "zlib"
end
end
function zlib:use()
@ -20,6 +23,7 @@ function zlib:use()
end
function zlib:project()
References:reset()
local folder = ThirdPartyFolder();
project "zlib"