-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpremake5.lua
169 lines (148 loc) · 3.68 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
--------------------------------------
-- solution configuration
workspace "tow"
location "projects"
configurations {"Debug", "Release"}
-- directory
objdir "projects/objs"
debugdir "./"
-- shared config
language "C++"
characterset "MBCS"
defines "_CRT_SECURE_NO_WARNINGS"
if string.find(_ACTION, "vs") then
disablewarnings "4201" -- disable nameless struct/union warning
end
-- conditional config
filter "system:Windows"
systemversion("latest")
filter "Debug"
symbols "on"
defines "DEBUG"
filter "Release"
optimize "on"
defines "NDEBUG"
filter {}
-- active project
startproject "tow"
-------------------------------------
-- imgui project
project "imgui"
location "projects/imgui"
kind "StaticLib"
links "OpenGL32"
defines "IMGUI_IMPL_OPENGL_LOADER_GLAD"
-- files
files {
"externals/imgui/*.cpp",
"externals/glad/*.c",
}
-- directory
targetdir "projects/libs"
includedirs {
"externals/imgui",
"externals/glfw",
"externals/glad/KHR",
"externals/glad/",
"externals/",
}
-- conditional config
filter "Debug"
targetsuffix "_d"
links "externals/glfw/glfw3_d"
filter "Release"
links "externals/glfw/glfw3"
filter {}
-----------------------------------------
-- psdump project
project "psdump"
kind "StaticLib"
location "projects/psdump"
targetdir "projects/libs"
-- files
files {
"externals/psdump/src/*.c",
"externals/psdump/src/*.cpp",
"externals/psdump/src/parser/*.cpp",
"externals/psdump/src/lodepng/*.cpp",
"externals/psdump/src/formatter/*.cpp",
"externals/psdump/libpsd-0.9/src/*.c",
}
-- directory
includedirs {
"externals/psdump/src",
"externals/psdump/src/parser",
"externals/psdump/src/lodepng",
"externals/psdump/src/formatter",
"externals/psdump/libpsd-0.9/include",
}
-- conditional config
filter "Debug"
targetsuffix "_d"
filter {}
------------------------------------------------
-- tow project
project "tow"
location "projects/tow"
kind "ConsoleApp"
defines "IMGUI_IMPL_OPENGL_LOADER_GLAD"
links "OpenGL32"
warnings "Extra" -- highest warning level
-- directory
targetdir "./"
libdirs {"projects/libs"}
includedirs {
"externals/imgui",
"externals/font",
"externals/glfw",
"externals/glfw/GLFW",
"externals/glad/KHR",
"externals/glad",
"externals/glm",
"externals/gltf",
"externals/psdump/src",
"externals/psdump/src/parser",
"externals/psdump/libpsd-0.9/include",
"externals",
"source/tow",
"source/examples",
"source/examples/asset_manager",
"source/examples/ui_editor",
"source/examples/shader_toy",
"source/examples/gltf_model_viewer",
"source/examples/block_world_editor",
"source/examples/simple_paint",
}
-- files
files {
"source/tow/tow.cpp",
"source/tow/tow.h",
"source/tow/call_stack.h",
"source/examples/*.cpp",
"source/examples/*.h",
"source/examples/asset_manager/*.cpp",
"source/examples/asset_manager/*.h",
"source/examples/gltf_model_viewer/*.cpp",
"source/examples/gltf_model_viewer/*.h",
"source/examples/shader_toy/*.cpp",
"source/examples/shader_toy/*.h",
"source/examples/ui_editor/*.cpp",
"source/examples/ui_editor/*.h",
"source/examples/block_world_editor/*.cpp",
"source/examples/block_world_editor/*.h",
"source/examples/simple_paint/*.cpp",
"source/examples/simple_paint/*.h",
}
filter "system:Windows"
files "source/tow/call_stack_win32.cpp"
filter "system:not Windows"
files "source/tow/call_stack.cpp"
filter {}
-- conditional config
filter "Debug"
links {"externals/glfw/glfw3_d", "imgui_d", "psdump_d"}
filter "Release"
links {"externals/glfw/glfw3", "imgui", "psdump"}
filter "system:Windows"
links "DbgHelp"
filter {}