forked from novusengine/Game
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
58 lines (45 loc) · 1.58 KB
/
premake5.lua
File metadata and controls
58 lines (45 loc) · 1.58 KB
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
56
57
58
Game = { }
Game.name = "Game"
Game.rootDir = ""
Game.buildDir = ""
Game.binDir = ""
Game.isRoot = false
Game.Init = function(self, rootDir, buildDir, binDir)
self.rootDir = rootDir
self.buildDir = buildDir
self.binDir = binDir .. "/" .. self.name
workspace (self.name)
location (buildDir)
configurations { "Debug", "RelDebug", "Release" }
filter "system:Windows"
system "windows"
platforms "Win64"
filter "system:Unix"
system "linux"
platforms "Linux"
local projectUtils = path.getabsolute("Premake/ProjectUtil.lua", rootDir)
include(projectUtils)
local buildSettings = path.getabsolute("Premake/BuildSettings.lua", rootDir)
local silentFailOnDuplicateSetting = false
InitBuildSettings(silentFailOnDuplicateSetting)
include(buildSettings)
IncludeSubmodule("Engine", rootDir, binDir)
print("-- Configuring (" .. self.name .. ") --\n")
print(" Root Directory : " .. rootDir)
print(" Build Directory : " .. buildDir)
print(" Bin Directory : " .. binDir)
print("--\n")
local deps = path.getabsolute("Dependencies/Dependencies.lua", rootDir)
local projects = path.getabsolute("Source/Projects.lua", rootDir)
include(deps)
include(projects)
print("-- Done (" .. self.name .. ") --")
end
if HasRoot == nil then
HasRoot = true
local rootDir = path.getabsolute(".")
local buildDir = path.getabsolute("Build/", rootDir)
local binDir = path.getabsolute("Bin/", buildDir)
Game.isRoot = true
Game:Init(rootDir, buildDir, binDir)
end