mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-09 22:38:06 -05:00
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:
19
thirdparty/libtomcrypt.lua
vendored
19
thirdparty/libtomcrypt.lua
vendored
@ -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"
|
||||
|
13
thirdparty/libtommath.lua
vendored
13
thirdparty/libtommath.lua
vendored
@ -1,13 +1,17 @@
|
||||
libtommath = {}
|
||||
|
||||
function libtommath:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "libtommath")
|
||||
}
|
||||
if References:include("libtommath") then
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "libtommath")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function libtommath:link()
|
||||
links "libtommath"
|
||||
if References:link("libtommath") then
|
||||
links "libtommath"
|
||||
end
|
||||
end
|
||||
|
||||
function libtommath:use()
|
||||
@ -15,6 +19,7 @@ function libtommath:use()
|
||||
end
|
||||
|
||||
function libtommath:project()
|
||||
References:reset()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "libtommath"
|
||||
|
13
thirdparty/minilzo.lua
vendored
13
thirdparty/minilzo.lua
vendored
@ -1,13 +1,17 @@
|
||||
minilzo = {}
|
||||
|
||||
function minilzo:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "minilzo")
|
||||
}
|
||||
if References:include("minilzo") then
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "minilzo")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function minilzo:link()
|
||||
links "minilzo"
|
||||
if References:link("minilzo") then
|
||||
links "minilzo"
|
||||
end
|
||||
end
|
||||
|
||||
function minilzo:use()
|
||||
@ -15,6 +19,7 @@ function minilzo:use()
|
||||
end
|
||||
|
||||
function minilzo:project()
|
||||
References:reset()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "minilzo"
|
||||
|
17
thirdparty/minizip.lua
vendored
17
thirdparty/minizip.lua
vendored
@ -1,15 +1,19 @@
|
||||
minizip = {}
|
||||
|
||||
function minizip:include()
|
||||
zlib:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "zlib/contrib/minizip")
|
||||
}
|
||||
if References:include("minizip") then
|
||||
zlib:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "zlib/contrib/minizip")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function minizip:link()
|
||||
zlib:link()
|
||||
links "minizip"
|
||||
if References:link("minizip") then
|
||||
zlib:link()
|
||||
links "minizip"
|
||||
end
|
||||
end
|
||||
|
||||
function minizip:use()
|
||||
@ -17,6 +21,7 @@ function minizip:use()
|
||||
end
|
||||
|
||||
function minizip:project()
|
||||
References:reset()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "minizip"
|
||||
|
13
thirdparty/salsa20.lua
vendored
13
thirdparty/salsa20.lua
vendored
@ -1,13 +1,17 @@
|
||||
salsa20 = {}
|
||||
|
||||
function salsa20:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "salsa20")
|
||||
}
|
||||
if References:include("salsa20") then
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "salsa20")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function salsa20:link()
|
||||
links "salsa20"
|
||||
if References:link("salsa20") then
|
||||
links "salsa20"
|
||||
end
|
||||
end
|
||||
|
||||
function salsa20:use()
|
||||
@ -15,6 +19,7 @@ function salsa20:use()
|
||||
end
|
||||
|
||||
function salsa20:project()
|
||||
References:reset()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "salsa20"
|
||||
|
20
thirdparty/zlib.lua
vendored
20
thirdparty/zlib.lua
vendored
@ -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"
|
||||
|
Reference in New Issue
Block a user