-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpremake5.lua
More file actions
141 lines (114 loc) · 2.38 KB
/
premake5.lua
File metadata and controls
141 lines (114 loc) · 2.38 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
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
-- Variables
output = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Workspace
workspace "Dash"
architecture "x64"
startproject "Game"
configurations {
"Debug",
"Release",
"Dist"
}
-- Include directories relative to root
IncludeDir = {}
IncludeDir["GLFW"] = "Dash/deps/GLFW/include"
IncludeDir["Glad"] = "Dash/deps/Glad/include"
IncludeDir["ImGui"] = "Dash/deps/imgui"
IncludeDir["glm"] = "Dash/deps/glm"
-- Grouping because undiagnosed OCD
group "Dependencies"
include "Dash/deps/GLFW"
include "Dash/deps/Glad"
include "Dash/deps/imgui"
-- Apparently this is needed to stop all projects from being grouped as deps
group ""
-- Engine project
project "Dash"
location "Dash"
kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "on"
targetdir ("bin/" .. output .. "/%{prj.name}")
objdir ("bin/obj/" .. output .. "/%{prj.name}")
pchheader "dspch.h"
pchsource "Dash/src/dspch.cpp"
files {
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
defines {
"_CRT_SECURE_NO_WARNINGS"
}
includedirs {
"%{prj.name}/src",
"%{prj.name}/deps/spdlog/include",
"%{IncludeDir.GLFW}",
"%{IncludeDir.Glad}",
"%{IncludeDir.ImGui}",
"%{IncludeDir.glm}"
}
links {
"GLFW",
"Glad",
"ImGui",
"opengl32.lib"
}
filter "system:windows"
systemversion "latest"
defines {
"DS_PLATFORM_WINDOWS",
"DS_BUILD_DLL",
"GLFW_INCLUDE_NONE"
}
filter "configurations:Debug"
defines "DS_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "DS_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "DS_DIST"
runtime "Debug"
optimize "on"
-- Game project
project "Game"
location "Game"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "on"
targetdir ("bin/" .. output .. "/%{prj.name}")
objdir ("bin/obj/" .. output .. "/%{prj.name}")
files {
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs {
"Dash/deps/spdlog/include",
"Dash/src",
"Dash/deps",
"%{IncludeDir.glm}"
}
links {
"Dash"
}
filter "system:windows"
systemversion "latest"
defines {
"DS_PLATFORM_WINDOWS"
}
filter "configurations:Debug"
defines "DS_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "DS_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "DS_DIST"
runtime "Release"
optimize "on"