-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
155 lines (113 loc) · 2.5 KB
/
premake5.lua
File metadata and controls
155 lines (113 loc) · 2.5 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
workspace "COMP3811-cw2"
language "C++"
cppdialect "C++17"
platforms { "x64" }
configurations { "debug", "release" }
flags "NoPCH"
flags "MultiProcessorCompile"
startproject "main"
debugdir "%{wks.location}"
objdir "_build_/%{cfg.buildcfg}-%{cfg.platform}-%{cfg.toolset}"
targetsuffix "-%{cfg.buildcfg}-%{cfg.platform}-%{cfg.toolset}"
-- Default toolset options
filter "toolset:gcc or toolset:clang"
linkoptions { "-pthread" }
buildoptions { "-march=native", "-Wall", "-pthread" }
-- Varriable-length arrays (VLAs) are an extension that GCC and clang
-- have long supported. However, they are not part of the C++ standard.
-- (MSVC will not compile code with VLAs.)
buildoptions { "-Werror=vla" }
filter "toolset:msc-*"
warnings "extra" -- this enables /W4; default is /W3
--buildoptions { "/W4" }
buildoptions { "/utf-8" }
buildoptions { "/permissive-" }
defines { "_CRT_SECURE_NO_WARNINGS=1" }
defines { "_SCL_SECURE_NO_WARNINGS=1" }
filter "*"
-- default libraries
filter "system:linux"
links "dl"
filter "system:windows"
links "OpenGL32"
filter "*"
-- default outputs
filter "kind:StaticLib"
targetdir "lib/"
filter "kind:ConsoleApp"
targetdir "bin/"
targetextension ".exe"
filter "*"
--configurations
filter "debug"
symbols "On"
defines { "_DEBUG=1" }
filter "release"
optimize "On"
defines { "NDEBUG=1" }
filter "*"
-- Third party dependencies
include "third_party"
-- Projects
project "main"
local sources = {
"main/**.cpp",
"main/**.hpp",
"main/**.hxx",
"main/**.inl"
}
kind "ConsoleApp"
location "main"
files( sources )
links "vmlib"
links "support"
links "x-stb"
links "x-glad"
links "x-glfw"
files( sources )
project "main-shaders"
local shaders = {
"assets/*.vert",
"assets/*.frag",
"assets/*.geom",
"assets/*.tesc",
"assets/*.tese",
"assets/*.comp"
}
kind "Utility"
location "assets"
files( shaders )
project "support"
local sources = {
"support/**.cpp",
"support/**.hpp",
"support/**.hxx",
"support/**.inl"
}
kind "StaticLib"
location "support"
files( sources )
project "vmlib"
local sources = {
"vmlib/**.cpp",
"vmlib/**.hpp",
"vmlib/**.hxx",
"vmlib/**.inl"
}
kind "StaticLib"
location "vmlib"
files( sources )
project "vmlib-test"
local sources = {
"vmlib-test/**.cpp",
"vmlib-test/**.hpp",
"vmlib-test/**.hxx",
"vmlib-test/**.inl"
}
kind "ConsoleApp"
location "vmlib-test"
files( sources )
links "vmlib"
links "x-catch2"
files( sources )
--EOF