move parts to new common component to avoid circular dependency of zonecommon and objcommon

This commit is contained in:
Jan
2021-03-03 12:56:15 -08:00
parent d616738be4
commit 12461d27e7
38 changed files with 70 additions and 22 deletions

41
src/Common.lua Normal file
View File

@ -0,0 +1,41 @@
Common = {}
function Common:include(includes)
if includes:handle(self:name()) then
Utils:include(includes)
includedirs {
path.join(ProjectFolder(), "Common")
}
end
end
function Common:link(links)
links:add(self:name())
links:linkto(Utils)
end
function Common:use()
end
function Common:name()
return "Common"
end
function Common:project()
local folder = ProjectFolder()
local includes = Includes:create()
project(self:name())
targetdir(TargetDirectoryLib)
location "%{wks.location}/src/%{prj.name}"
kind "StaticLib"
language "C++"
files {
path.join(folder, "Common/**.h"),
path.join(folder, "Common/**.cpp")
}
self:include(includes)
end