2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-10 21:21:50 +00:00

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,26 +1,31 @@
Linker = {}
function Linker:include()
if References:include("Linker") then
function Linker:include(includes)
if includes:handle(self:name()) then
includedirs {
path.join(ProjectFolder(), "Linker")
}
end
end
function Linker:link()
function Linker:link(links)
end
function Linker:use()
dependson "Linker"
dependson(self:name())
end
function Linker:name()
return "Linker"
end
function Linker:project()
References:reset()
local folder = ProjectFolder();
local folder = ProjectFolder()
local includes = Includes:create()
local links = Links:create()
project "Linker"
project(self:name())
targetdir(TargetDirectoryBin)
location "%{wks.location}/src/%{prj.name}"
kind "ConsoleApp"
@ -31,10 +36,12 @@ function Linker:project()
path.join(folder, "Linker/**.cpp")
}
self:include()
Utils:include()
ZoneWriting:include()
self:include(includes)
Utils:include(includes)
ZoneWriting:include(includes)
Utils:link()
--ZoneWriting:link()
links:linkto(Utils)
links:linkto(ZoneWriting)
--ZoneWriting:link(links)
links:linkall()
end