-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
106 lines (89 loc) · 2.48 KB
/
premake5.lua
File metadata and controls
106 lines (89 loc) · 2.48 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
workspace "OpenGL-Mini-Engine"
configurations {"Release", "Debug"}
location "build"
language "C++"
cppdialect "C++17"
filter "system:windows"
architecture "x86_64"
filter {}
newaction {
trigger = "resources",
description = "Copy resources into the bin folder",
execute = function ()
if os.host() == "windows" then
os.execute("xcopy /s /i resources\\* build\\app\\bin\\Release\\")
os.execute("xcopy /s /i resources\\* build\\app\\bin\\Debug\\")
else
os.execute("cp -nr resources/* build/app/bin/Release/")
os.execute("cp -nr resources/* build/app/bin/Debug/")
end
end
}
newaction {
trigger = "docs",
description = "Generate documentation with Doxygen",
execute = function()
os.execute("doxygen Doxyfile")
end
}
filter "configurations:Release"
defines { "NDEBUG" }
optimize "on"
filter "configurations:Debug"
defines { "DEBUG" }
symbols "on"
project "Lib"
kind "StaticLib"
location "build/lib"
files {
"src/**.cpp",
"vendor/src/ImGui/**.cpp",
"vendor/src/glad/glad.c",
"vendor/src/stb_image/stb_image.cpp"
}
includedirs {
"src",
"src/pch",
"vendor/include",
"vendor/include/ImGui",
}
pchheader "pch.h"
pchsource "src/pch/pch.cpp"
filter { "system:windows", "files:**.cpp" }
forceincludes { "pch.h" }
filter { "system:windows", "files:**.c" }
flags { "NoPCH" }
project "App"
kind "ConsoleApp"
location "build/app"
targetname "Engine"
files "main.cpp"
includedirs "src"
dependson "Lib"
links "Lib"
filter "configurations:Debug"
libdirs "build/lib/bin/Debug/"
filter "configurations:Release"
libdirs "build/lib/bin/Release"
-- Link GLFW
filter "system:windows"
libdirs "vendor/lib/GLFW"
links "glfw3.lib"
filter "system:linux"
libdirs "/lib"
links "glfw"
project "Test"
kind "ConsoleApp"
location "build/test"
files "test/**.cpp"
includedirs {
"src",
"vendor/include",
"vendor/include/ImGui"
}
dependson "Lib"
links "Lib"
filter "configurations:Debug"
libdirs "build/lib/bin/Debug/"
filter "configurations:Release"
libdirs "build/lib/bin/Release/"