-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildUtils.lua
93 lines (78 loc) · 1.88 KB
/
BuildUtils.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
-- Link our dependencies.
function linkDependencies()
includedirs {
"Libraries/glad/include",
"Libraries/glfw/include",
"Libraries/glm/include",
"Libraries/imgui/include",
"Libraries/spdlog/include",
"Libraries/stb_image/include",
}
libdirs {
"Libraries/glad/lib",
"Libraries/glfw/lib",
"Libraries/glm/lib",
"Libraries/imgui/lib",
"Libraries/spdlog/lib",
}
-- Our static lib should not link against our dependencies
filter { "kind:not StaticLib", "configurations:Debug" }
links {
"glad_debug",
"glm_debug",
"glfw3",
"imgui_debug",
"spdlogd",
}
filter { "kind:not StaticLib", "configurations:Dist" }
links {
"glad_dist",
"glm_dist",
"glfw3",
"imgui_dist",
"spdlog",
}
filter { "kind:not StaticLib", "configurations:Release" }
links {
"glad_release",
"glm_release",
"glfw3",
"imgui_release",
"spdlog",
}
end
-- Include the files that we use from our dependencies.
function includeDependencies()
includedirs {
"Libraries/glad/include",
"Libraries/glfw/include",
"Libraries/glm/include",
"Libraries/imgui/include",
"Libraries/spdlog/include",
"Libraries/stb_image/include",
}
files {
"Libraries/glad/include/**.h",
"Libraries/glad/src/glad.c",
"Libraries/glfw/include/**.h",
"Libraries/glm/include/**.hpp",
"Libraries/glm/include/**.inl",
"Libraries/imgui/include/**.h",
"Libraries/imgui/include/**.cpp",
"Libraries/spdlog/include/**.h",
"Libraries/stb_image/include/**.h",
"Libraries/stb_image/include/**.cpp",
}
end
-- Include the Projects/Core code
function useCoreLib()
-- The library's public headers
includedirs
{
"Projects/Core/**"
}
-- We link against a library that's in the same workspace, so we can just use the project name - premake is really smart and will handle everything for us.
links "Core"
-- Users of Core need to link GLFW and ImGui
linkDependencies()
end