-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
premake5.lua
102 lines (81 loc) · 2.17 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
dependencies = { base = path.getrelative(os.getcwd(), path.getabsolute("deps")) }
function dependencies.load()
dir = path.join(dependencies.base, "*.lua")
deps = os.matchfiles(dir)
for i, dep in pairs(deps) do
dep = dep:gsub(".lua", "")
require(dep)
end
end
dependencies.load()
-------------------------------------------------
workspace "menu-tool"
startproject "menu-tool"
location "./build"
objdir "%{wks.location}/obj/%{cfg.buildcfg}/%{prj.name}"
targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}"
targetname "%{prj.name}"
configurations { "debug", "release" }
if os.istarget("darwin") then
platforms { "x64", "arm64" }
else
platforms { "x86", "x64" }
end
filter "platforms:x86"
architecture "x86"
filter {}
filter "platforms:x64"
architecture "x86_64"
filter {}
filter "platforms:arm64"
architecture "ARM64"
filter {}
filter { "language:C++", "toolset:not msc*" }
buildoptions "-std=c++20"
filter {}
filter "toolset:msc*"
buildoptions "/bigobj"
buildoptions "/Zc:__cplusplus"
buildoptions "/std:c++20"
filter {}
filter { "system:windows" }
systemversion "latest"
filter {}
filter { "system:macosx" }
systemversion "12.0"
filter {}
symbols "On"
staticruntime "On"
warnings "Extra"
if os.istarget("linux") or os.istarget("darwin") then
buildoptions "-pthread"
linkoptions "-pthread"
end
filter "configurations:release"
optimize "Full"
defines { "NDEBUG" }
flags { "FatalCompileWarnings" }
filter {}
filter "configurations:debug"
optimize "Debug"
defines { "DEBUG", "_DEBUG" }
filter {}
project "menu-tool"
kind "ConsoleApp"
language "C++"
targetname "menu-tool"
files {
"./include/**.hpp",
"./src/utils/**.hpp",
"./src/utils/**.cpp",
"./src/menu/**.hpp",
"./src/menu/**.cpp",
"./src/tool/**.hpp",
"./src/tool/**.cpp"
}
includedirs {
"./include",
}
fmt:link()
group "Dependencies"
fmt:project()