forked from InfiniteC0re/OpenBarnyard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
142 lines (111 loc) · 2.66 KB
/
premake5.lua
File metadata and controls
142 lines (111 loc) · 2.66 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
include "Settings.lua"
include "Dependencies.lua"
workspace "OpenBarnyard"
cppdialect "C++20"
characterset "ASCII"
platforms "Windows"
configurations { "Debug", "Release", "Final" }
disablewarnings { "4996" }
debugdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
editandcontinue "Off"
-- Global defines
defines
{
"_CRT_SECURE_NO_WARNINGS",
"NOMINMAX",
"BAN_OPCODE_AUTOLINK",
"ICE_NO_DLL",
"BARNYARD_COMMUNITY_PATCH", -- Optimize loading speed, fix bugs and more...
"USE_ATOMIC" -- Utilize alternative TMutex, TSemaphore and TFifo implementation on Windows platform
}
-- Global settings for include dirs
includedirs
{
"%{IncludeDir.toshi}"
}
filter "options:arch=x86"
architecture "x86"
filter { "options:profiler=perf or options:profiler=perfmem" }
defines
{
"TOSHI_PROFILER",
"TRACY_ENABLE"
}
links { "TracyProfiler" }
includedirs { "%{IncludeDir.tracy}" }
filter "options:profiler=perfmem"
defines { "TOSHI_PROFILER_MEMORY" }
filter "options:dlmalloc=yes"
defines { "TMEMORY_USE_DLMALLOC" }
--filter "options:arch=x64"
-- architecture "x64"
-- Global Windows parameters
filter "system:windows"
systemversion "latest"
vectorextensions "SSE2"
linkoptions
{
"/SAFESEH:NO"
}
defines
{
"TOSHI_SKU_WINDOWS"
}
filter "options:renderer=DX8"
externalincludedirs
{
"%{IncludeDir.dx8}"
}
defines
{
"TRENDERINTERFACE_DX8"
}
filter "options:renderer=GL"
defines
{
"TRENDERINTERFACE_GL",
"GLEW_STATIC",
"GLM_FORCE_LEFT_HANDED"
}
filter "configurations:Debug"
runtime "Debug"
defines "TOSHI_DEBUG"
symbols "On"
filter "configurations:Release"
runtime "Release"
defines "TOSHI_RELEASE"
optimize "On"
filter "configurations:Final"
runtime "Release"
defines "TOSHI_FINAL"
optimize "On"
filter {}
-- Include the projects
group "Engine"
include "Toshi"
include "OpenBarnyard"
group "Tools"
include "Tools/AssetPack"
include "Tools/TMDL"
include "Tools/XML2PProperties"
include "Tools/TLocaleCompiler"
include "Tools/PPropertyCompiler"
include "Tools/QuestCompiler"
include "Tools/Sounds2Enum"
group "Third-Party"
include "Toshi/Vendor/Opcode"
group "SDK"
include "SDK/BYardSDK"
include "SDK/BYModCore"
include "SDK/BYSpeedrunHelper"
include "SDK/BYTexturePacks"
include "SDK/BYWinterMod"
if _OPTIONS["renderer"] == 'GL' then
include "SDK/BYEnhanced"
end
if _OPTIONS["profiler"] == 'perf' or _OPTIONS["profiler"] == 'perfmem' then
group "Utils"
include "Utils/TracyProfiler"
end