-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
151 lines (123 loc) · 3.36 KB
/
premake5.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
local ROOT_DIR = path.getabsolute(".")
local BUILD_DIR = path.join(ROOT_DIR, "Build")
local THIRDPARTY_DIR = path.join(ROOT_DIR, "ThirdParty")
workspace "RaylibGames"
do
language "C++"
location (BUILD_DIR)
platforms { "x32", "x64" }
configurations { "Debug", "Release" }
--cdialect "c99"
--compileas "C++"
--staticruntime "On"
flags {
"NoPCH"
}
filter { "configurations:Debug"}
do
defines {
"DEBUG"
}
end
filter { "configurations:Release"}
do
defines {
"RELEASE"
}
end
filter {}
end
project "Framework"
do
kind "StaticLib"
links {
}
includedirs {
path.join(ROOT_DIR, "Framework/Include"),
path.join(ROOT_DIR, "ThirdParty/Include"),
path.join(ROOT_DIR, "ThirdParty/Sources/spine-c/include"),
}
files {
path.join(ROOT_DIR, "Framework/Include/*.h"),
path.join(ROOT_DIR, "Framework/Include/**/*.h"),
path.join(ROOT_DIR, "Framework/Sources/*.c"),
path.join(ROOT_DIR, "Framework/Sources/**/*.c"),
path.join(ROOT_DIR, "Framework/Sources/*.cpp"),
path.join(ROOT_DIR, "Framework/Sources/**/*.cpp"),
path.join(THIRDPARTY_DIR, "Include/raylib.h"),
path.join(THIRDPARTY_DIR, "Include/raymath.h"),
path.join(THIRDPARTY_DIR, "Sources/spine-c/src/*.c"),
path.join(THIRDPARTY_DIR, "Sources/spine-c/src/**/*.c"),
}
filter {}
end
local function template(name, projectPath, shouldHideConsole)
project (name)
do
if not shouldHideConsole then
kind "ConsoleApp"
else
filter { "configurations:Debug" }
do
kind "ConsoleApp"
end
filter { "configurations:Release" }
do
kind "WindowedApp"
end
filter {}
end
links {
"Framework",
"raylib_static",
"winmm",
}
includedirs {
path.join(ROOT_DIR, "Framework/Include"),
path.join(ROOT_DIR, "ThirdParty/Include"),
path.join(ROOT_DIR, "ThirdParty/Sources/spine-c/include"),
}
files {
path.join(ROOT_DIR, projectPath, "*.h"),
path.join(ROOT_DIR, projectPath, "**/*.h"),
path.join(ROOT_DIR, projectPath, "*.c"),
path.join(ROOT_DIR, projectPath, "**/*.c"),
path.join(ROOT_DIR, projectPath, "*.cpp"),
path.join(ROOT_DIR, projectPath, "**/*.cpp"),
}
defines {
"GRAPHICS_API_OPENGL_33",
"PLATFORM_DESKTOP"
}
filter { "platforms:x32" }
do
libdirs { path.join(ROOT_DIR, "ThirdParty/Library/Win32") }
end
filter { "platforms:x64" }
do
libdirs { path.join(ROOT_DIR, "ThirdParty/Library/Win64") }
end
filter {}
end
end
local function example(name)
template(name, path.join("Examples", name))
end
local function game(name)
template(name, path.join("Games", name), true)
end
example "BasicWindow"
example "Gestures"
example "AppState"
example "Shapes"
example "Easing"
example "Textures"
example "DrawRing"
example "LiquidSurface2D"
example "MeshDeformation2D"
example "Todos"
example "UI"
example "ECS"
example "FLECS"
example "Spine"
game "NeonShooter"