Rework depedency management in premake lua scripts

This commit is contained in:
Jan
2021-03-03 11:55:37 -08:00
parent 1a45cf2107
commit dc3fef5b0f
29 changed files with 447 additions and 386 deletions

View File

@ -1,28 +1,30 @@
salsa20 = {}
function salsa20:include()
if References:include("salsa20") then
function salsa20:include(includes)
if includes:handle(self:name()) then
includedirs {
path.join(ThirdPartyFolder(), "salsa20")
}
end
end
function salsa20:link()
if References:link("salsa20") then
links "salsa20"
end
function salsa20:link(links)
links:add(self:name())
end
function salsa20:use()
end
function salsa20:project()
References:reset()
local folder = ThirdPartyFolder();
function salsa20:name()
return "salsa20"
end
project "salsa20"
function salsa20:project()
local folder = ThirdPartyFolder()
local includes = Includes:create()
project(self:name())
targetdir(TargetDirectoryLib)
location "%{wks.location}/thirdparty/%{prj.name}"
kind "StaticLib"
@ -33,7 +35,7 @@ function salsa20:project()
path.join(folder, "salsa20/*.c")
}
self:include()
self:include(includes)
-- Disable warnings. They do not have any value to us since it is not our code.
warnings "off"