-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
118 lines (95 loc) · 2.58 KB
/
premake5.lua
File metadata and controls
118 lines (95 loc) · 2.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
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
workspace "gl_renderer"
architecture "x86_64"
configurations { "Debug", "Release", "Dist" }
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["spdlog"] = "%{wks.location}/third_party/spdlog/include"
IncludeDir["glfw"] = "%{wks.location}/third_party/glfw/include"
IncludeDir["glew"] = "%{wks.location}/third_party/glew/include"
IncludeDir["imgui"] = "%{wks.location}/third_party/imgui"
IncludeDir["flecs"] = "%{wks.location}/third_party/flecs"
IncludeDir["glm"] = "%{wks.location}/third_party/glm/include"
include "/third_party/glew"
include "/third_party/glfw"
includedirs
{
"/third_party/imgui",
"/third_party/flecs",
}
project "gl_renderer"
kind "ConsoleApp"
language "C++"
cppdialect "C++latest"
staticruntime "on"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files
{
-- headers
"source/**.h",
-- my sources
"source/main.cpp",
"source/window.cpp",
"source/gfx/gfx.cpp",
"source/gfx/gfx_utils.cpp",
"source/gui/gui.cpp",
"source/utils/stb_image.cpp",
"source/utils/stb_perlin.cpp",
"source/utils/stb_leakcheck.cpp",
"source/utils/stb_include.cpp",
"source/utils/tiny_obj_loader.cpp",
--imgui
"third_party/imgui/imgui_demo.cpp",
"third_party/imgui/imgui_draw.cpp",
"third_party/imgui/imgui_tables.cpp",
"third_party/imgui/imgui_widgets.cpp",
"third_party/imgui/imgui.cpp",
-- flecs
"third_party/flecs/flecs.c",
}
includedirs
{
"source",
"%{IncludeDir.spdlog}",
"%{IncludeDir.glew}",
"%{IncludeDir.glfw}",
"%{IncludeDir.imgui}",
"%{IncludeDir.flecs}",
"%{IncludeDir.glm}"
}
defines
{
"GLFW_INCLUDE_NONE",
"GLEW_STATIC"
}
links
{
"glew",
"glfw",
}
filter "system:windows"
system "windows"
links { "opengl32.lib", }
defines {
"_CRT_SECURE_NO_WARNINGS",
"R_PLATFORM_WINDOWS"
}
filter "system:linux"
system "linux"
linkoptions {"-pthread"}
links { "GL", "dl"}
defines {
"R_PLATFORM_LINUX"
}
filter "configurations:Debug"
defines { "DEBUG", "R_DEBUG" }
runtime "Debug"
symbols "On"
filter "configurations:Release"
defines { "RDEBUG", "R_RELEASE" }
runtime "Release"
optimize "On"
filter "configurations:Dist"
defines { "NDEBUG", "R_DIST" }
runtime "Release"
optimize "On"