-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpackage_project.lua
55 lines (41 loc) · 1.43 KB
/
package_project.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
-- Package management module
-- Package API to wrap around 'projects'.
-- Copyright (c) 2017 Blizzard Entertainment
---
local p = premake
local m = p.modules.packagemanager
-- Package API ----------------------------------------------------------------
local packageAPI = {}
function packageAPI:loadvariants(filter)
end
function packageAPI:loadvariant(variant)
end
function packageAPI:generateManifest(tbl, wks)
end
-- Importing API --------------------------------------------------------------
function m.createProjectPackage(name, version)
local result = m.createPackageBase(name, version)
-- override base method.
result.auto_includes = function(cfg) return {} end
result.auto_defines = function(cfg) return {} end
result.auto_dependson = function(cfg) return {} end
result.auto_links = function(cfg) return { name } end
result.auto_libdirs = function(cfg) return {} end
result.auto_bindirs = function(cfg) return { cfg.targetdir } end
result.auto_includedependencies = function(cfg) return {} end
result.auto_linkdependencies = function(cfg) return {} end
-- override base method.
function result:initialize()
end
return setmetatable(result, {
__metatable = false,
__index = packageAPI,
__newindex = function(tbl, key, value)
error("Attempt to modify readonly table.")
end,
__tostring = function()
return "Project Package"
end,
})
end