-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
73 lines (61 loc) · 1.86 KB
/
premake5.lua
File metadata and controls
73 lines (61 loc) · 1.86 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
-- Clean Function --
newaction {
trigger = "clean",
description = "clean the software",
execute = function ()
print("extract the build...")
os.rmdir("./generated")
print("empty the bin...")
os.rmdir("./bin")
print("done.")
end
}
function string.starts(String,Start)
return string.sub(String,1,string.len(Start))==Start
end
function link_to(lib)
links (lib)
includedirs ("../"..lib.."/include")
includedirs ("../"..lib.."/" )
end
function download_progress(total, current)
local ratio = current / total;
ratio = math.min(math.max(ratio, 0), 1);
local percent = math.floor(ratio * 100);
print("Download progress (" .. percent .. "%/100%)")
end
function check_imgui()
if(os.isdir("imgui") == false and os.isdir("imgui-docking") == false) then
if(not os.isfile("imgui-docking.zip")) then
print("ImGui not found, downloading from github")
local result_str, response_code = http.download("https://github.com/UntitledOutput/imgui/archive/refs/heads/docking.zip", "imgui-docking.zip", {
progress = download_progress,
headers = { "From: Premake", "Referer: Premake" }
})
end
print("Unzipping to " .. os.getcwd())
zip.extract("imgui-docking.zip", os.getcwd())
os.remove("imgui-docking.zip")
end
--includedirs {"imgui-docking"}
end
-- premake5.lua
workspace "AuroraEngine"
configurations { "Debug", "Release" }
platforms { "x32", "x64" }
filter { "platforms:x32" }
system "Windows"
architecture "x86"
filter { "platforms:x64" }
system "Windows"
architecture "x64"
flags { "MultiProcessorCompile"}
group "Core"
include "core-premake5.lua"
group ""
group "Engine"
include "engine-premake5.lua"
group ""
group "ScriptCore"
include "scriptcore-premake5.lua"
group ""