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,21 @@
libtomcrypt = {}
function libtomcrypt:include()
defines{
"LTM_DESC"
}
if References:include("libtomcrypt") then
defines{
"LTM_DESC"
}
includedirs {
path.join(ThirdPartyFolder(), "libtomcrypt/src/headers")
}
includedirs {
path.join(ThirdPartyFolder(), "libtomcrypt/src/headers")
}
end
end
function libtomcrypt:link()
links "libtomcrypt"
if References:link("libtomcrypt") then
links "libtomcrypt"
end
end
function libtomcrypt:use()
@ -19,6 +23,7 @@ function libtomcrypt:use()
end
function libtomcrypt:project()
References:reset()
local folder = ThirdPartyFolder();
project "libtomcrypt"