Repository navigation
Expand file tree
/
Copy pathWorkspace.lua
More file actions
158 lines (128 loc) · 3.08 KB
/
Copy pathWorkspace.lua
File metadata and controls
158 lines (128 loc) · 3.08 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
-- The settings of the OpenBarnyard workspace, call it right after declaring a workspace that includes the
-- OpenBarnyard projects
function OpenBarnyardWorkspaceSettings()
cppdialect "C++20"
characterset "ASCII"
configurations { "Debug", "Release", "Final" }
platforms ( os.target() == "emscripten" and "WASM" or "Win32" )
-- Enables fast builds
if os.target() ~= "emscripten" then
multiprocessorcompile "on"
end
disablewarnings
{
"4996",
"4251",
"4275"
}
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", "not system:emscripten" }
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:latest=yes"
defines { "BARNYARD_LATEST" } -- Code from the latest version of the game
--filter "options:arch=x64"
-- architecture "x64"
-- Global Windows parameters
filter "system:windows"
systemversion "latest"
vectorextensions "SSE2"
exceptionhandling "Off"
linkoptions "/SAFESEH:NO"
defines
{
"TOSHI_SKU_WINDOWS"
}
filter "options:renderer=DX8"
externalincludedirs
{
"%{IncludeDir.dx8}"
}
defines
{
"TRENDERINTERFACE_DX8"
}
filter "options:renderer=DX11"
defines
{
"TRENDERINTERFACE_DX11"
}
filter "options:renderer=GL"
defines
{
"TRENDERINTERFACE_GL"
}
-- wasm32 with the layouts and the wide characters of the Windows build
filter "system:emscripten"
toolset "emcc"
architecture "wasm32"
exceptionhandling "Off"
defines
{
"TOSHI_SKU_WASM"
}
buildoptions
{
"-pthread",
"-fms-extensions",
"-fms-compatibility",
"-fms-compatibility-version=19.30",
"-U_MSC_VER",
"-U_MSC_FULL_VER",
"-U_MSC_BUILD",
"-U_MSC_EXTENSIONS",
"-fdelayed-template-parsing",
"-fdeclspec",
"-fshort-wchar",
-- The optimizer turns our string loops into wcslen, and the one in libc expects 4 byte characters
"-fno-builtin-wcslen",
"-fno-strict-aliasing",
"-w"
}
linkoptions
{
"-pthread"
}
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 {}
end