-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
134 lines (110 loc) · 2.34 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
workspace "Ember"
architecture "x86"
startproject "Sandbox"
configurations {
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["SDL2"] = "libs/SDL2/include"
IncludeDir["GLAD"] = "libs/GLAD/include"
IncludeDir["glm"] = "libs/glm"
IncludeDir["freetype"] = "libs/freetype-2.10.0/include"
IncludeDir["imgui"] = "libs/imgui"
IncludeDir["stb_image"] = "libs/stb_image"
include "libs/GLAD"
include "libs/imgui"
project "Sandbox"
location "Sandbox"
kind "ConsoleApp"
language "C++"
staticruntime "on"
cppdialect "C++17"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files {
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs {
"Ember/include",
"%{IncludeDir.SDL2}",
"%{IncludeDir.GLAD}",
"%{IncludeDir.glm}",
"%{IncludeDir.imgui}",
"%{IncludeDir.freetype}",
"%{IncludeDir.stb_image}"
}
links
{
"Ember"
}
filter "system:windows"
systemversion "latest"
filter "configurations:Debug"
defines "EMBER_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "EMBER_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "EMBER_DIST"
runtime "Release"
optimize "on"
project "Ember"
location "Ember"
kind "StaticLib"
language "C++"
staticruntime "on"
cppdialect "C++17"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files {
"%{prj.name}/include/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs {
"Ember/include",
"%{IncludeDir.SDL2}",
"%{IncludeDir.GLAD}",
"%{IncludeDir.glm}",
"%{IncludeDir.freetype}",
"%{IncludeDir.imgui}",
"%{IncludeDir.stb_image}"
}
defines {
"_CRT_SECURE_NO_WARNINGS",
"STB_IMAGE_IMPLEMENTATION",
"EMBER_OPENGL_ACTIVATED"
}
libdirs {
"libs/SDL2/lib/x86",
"libs/freetype-2.10.0"
}
links {
"ImGui",
"SDL2.lib",
"SDL2main.lib",
"SDL2_image.lib",
"SDL2_mixer.lib",
"GLAD",
"freetype.lib"
}
filter "system:windows"
systemversion "latest"
filter "configurations:Debug"
defines "EMBER_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "EMBER_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "EMBER_DIST"
runtime "Release"
optimize "on"