forked from multitheftauto/mtasa-blue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
148 lines (124 loc) · 3.56 KB
/
premake5.lua
File metadata and controls
148 lines (124 loc) · 3.56 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
-- Add buildactions to path
premake.path = premake.path..";utils/buildactions"
require "compose_files"
require "install_data"
require "install_resources"
require "install_cef"
-- Set CI Build global
local ci = os.getenv("CI")
if ci and ci:lower() == "true" then
CI_BUILD = true
else
CI_BUILD = false
end
workspace "MTASA"
configurations {"Debug", "Release", "Nightly"}
platforms { "x86", "x64"}
targetprefix ("")
location "Build"
startproject "Client Launcher"
flags { "C++11" }
characterset "MBCS"
pic "On"
symbols "On"
dxdir = os.getenv("DXSDK_DIR") or ""
includedirs {
"vendor",
"Shared/sdk",
}
defines {
"_CRT_SECURE_NO_WARNINGS",
"_SCL_SECURE_NO_WARNINGS",
"_CRT_NONSTDC_NO_DEPRECATE",
"NOMINMAX"
}
-- Helper function for output path
buildpath = function(p) return "%{wks.location}/../Bin/"..p.."/" end
copy = function(p) return "{COPY} %{cfg.buildtarget.abspath} %{wks.location}../Bin/"..p.."/" end
filter "platforms:x86"
architecture "x86"
filter "platforms:x64"
architecture "x86_64"
filter "configurations:Debug"
defines { "MTA_DEBUG" }
targetsuffix "_d"
filter "configurations:Release or configurations:Nightly"
optimize "Speed" -- "On"=MS:/Ox GCC:/O2 "Speed"=MS:/O2 GCC:/O3 "Full"=MS:/Ox GCC:/O3
if CI_BUILD then
filter {}
defines { "CI_BUILD=1" }
filter { "system:linux" }
linkoptions { "-s" }
end
filter {"system:windows", "configurations:Nightly", "kind:not StaticLib"}
os.mkdir("Build/Symbols")
linkoptions "/PDB:\"Symbols\\$(ProjectName).pdb\""
filter {"system:windows", "toolset:*140*"}
defines { "_TIMESPEC_DEFINED" } -- fix pthread redefinition error, TODO: Remove when we fully moved to vs2015
filter {"system:windows", "toolset:*_xp*"}
buildoptions { "/Zc:threadSafeInit-" } -- Fix Windows XP not initialising TLS early
filter "system:windows"
toolset "v140"
flags { "StaticRuntime" }
defines { "WIN32", "_WIN32" }
includedirs {
dxdir.."Include"
}
libdirs {
dxdir.."Lib/x86"
}
filter {"system:windows", "configurations:Debug"}
buildoptions { "/MT" } -- Don't use debug runtime when static linking
defines { "DEBUG" } -- Using DEBUG as _DEBUG is not available with /MT
filter "system:linux"
vectorextensions "SSE2"
-- Only build the client on Windows
if os.get() == "windows" then
group "Client"
include "Client/ceflauncher"
include "Client/ceflauncher_DLL"
include "Client/cefweb"
include "Client/core"
include "Client/game_sa"
include "Client/sdk"
include "Client/gui"
include "Client/launch"
include "Client/loader"
include "Client/multiplayer_sa"
include "Client/mods/deathmatch"
group "Client/CEGUI"
include "vendor/cegui-0.4.0-custom/src/renderers/directx9GUIRenderer"
include "vendor/cegui-0.4.0-custom/WidgetSets/Falagard"
include "vendor/cegui-0.4.0-custom"
group "Vendor"
include "vendor/portaudio"
include "vendor/cef3"
include "vendor/jpeg-9b"
include "vendor/libpng"
include "vendor/tinygettext"
include "vendor/pthreads"
include "vendor/libspeex"
include "vendor/curl/lib"
end
filter {}
group "Server"
include "Server/core"
include "Server/dbconmy"
include "Server/launcher"
include "Server/mods/deathmatch"
group "Shared"
include "Shared"
include "Shared/XML"
group "Vendor"
include "vendor/cryptopp"
include "vendor/ehs"
include "vendor/google-breakpad"
include "vendor/json-c"
include "vendor/lua"
include "vendor/pcre"
include "vendor/pme"
include "vendor/sqlite"
include "vendor/tinyxml"
include "vendor/unrar"
include "vendor/zip"
include "vendor/zlib"