mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
move parts to new common component to avoid circular dependency of zonecommon and objcommon
This commit is contained in:
41
src/Common.lua
Normal file
41
src/Common.lua
Normal 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
|
Reference in New Issue
Block a user