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:
31
premake5.lua
31
premake5.lua
@ -19,6 +19,37 @@ function TestFolder()
|
||||
return path.getrelative(os.getcwd(), _TestFolder)
|
||||
end
|
||||
|
||||
-- Functions for including projects
|
||||
References = {
|
||||
includeList = {},
|
||||
linkList = {}
|
||||
}
|
||||
|
||||
function References:include(name)
|
||||
result = self.includeList[name] == nil
|
||||
|
||||
if result then
|
||||
self.includeList[name] = true
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
function References:link(name)
|
||||
result = self.linkList[name] == nil
|
||||
|
||||
if result then
|
||||
self.linkList[name] = true
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
function References:reset()
|
||||
self.includeList = {}
|
||||
self.linkList = {}
|
||||
end
|
||||
|
||||
-- Target Directories
|
||||
TargetDirectoryBin = "%{wks.location}/bin/%{cfg.buildcfg}_%{cfg.platform}"
|
||||
TargetDirectoryLib = "%{wks.location}/lib/%{cfg.buildcfg}_%{cfg.platform}"
|
||||
|
Reference in New Issue
Block a user