-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.lua
46 lines (37 loc) · 988 Bytes
/
build.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
include('utilities/premake_args.lua')
include('utilities/system.lua')
include('utilities/env.lua')
include('utilities/base.lua')
include('utilities/lib.lua')
include('utilities/app.lua')
-- Root
env.root = _OPTIONS['root']
StopIf(env.root == nil, 'Missing root path')
-- Paths after root
include('utilities/paths.lua')
-- Global config
include(env.config_file)
StopIf(env.config == nil, 'Missing config')
-- Loading project configs
for i, file in ipairs(GetFilesRecursive(env.code_dir, '%.lua$')) do
include(file)
env.projects[#env.projects].dir = GetDirPath(file)
end
-- Init projects
for i, proj in ipairs(env.projects) do
Call(proj, 'Init')
end
-- TODO: make this be the global config file
-- Setup solution
workspace(env.config.name)
location(env.solution_dir)
configurations { 'Debug', 'Release' }
architecture('x64')
-- TODO: make this done automatically
Base:Init()
App:Init()
Lib:Init()
-- Setup projects
for i, proj in ipairs(env.projects) do
Call(proj, 'Setup')
end