forked from opentibia-xx/otserv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake4.lua
121 lines (108 loc) · 2.06 KB
/
premake4.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
-- Visual Studio libraries directories
local vs_libdirs =
{
"$(BOOST_LIB_PATH)",
"$(GMP_LIB_PATH)",
"$(LIBXML_LIB_PATH)",
"$(MYSQL_LIB_PATH)",
"$(SQLITE_LIB_PATH)",
"$(PSQL_LIB_PATH)",
"$(LUA_LIB_PATH)"
}
-- Visual Studio includes directories
local vs_includedirs =
{
"$(BOOST_INCLUDE_PATH)",
"$(GMP_INCLUDE_PATH)",
"$(LIBXML_INCLUDE_PATH)",
"$(MYSQL_INCLUDE_PATH)",
"$(SQLITE_INCLUDE_PATH)",
"$(PSQL_INCLUDE_PATH)",
"$(LUA_INCLUDE_PATH)"
}
-- Visual Studio preprocessor definitions
local vs_defines =
{
"_WIN32_WINNT=0x0501",
"_CRT_SECURE_NO_DEPRECATE",
"_CRT_SECURE_NO_WARNINGS",
"_CRT_NON_CONFORMING_SWPRINTFS",
"__OLD_GUILD_SYSTEM__",
"NOMINMAX"
}
-- Build options
local options =
{
"mysql",
"sqlite",
"postgre",
"odbc"
}
solution "otserv"
configurations { "Release", "Debug" }
project "otserv"
targetname "otserv"
language "C++"
kind "ConsoleApp"
location "build"
files
{
"*.cpp",
"*.h"
}
configuration "Release"
targetdir "build/release"
flags
{
"OptimizeSpeed",
--"NoFramePointer",
-- SSE2 is present in any AMD/INTEL CPU since 2004. It
-- won't hurt anyone if enabled.
"EnableSSE2"
}
configuration "Debug"
targetdir "build/debug"
flags { "Symbols" }
-- Configuration for Visual Studio projects
configuration { "vs* or windows" }
defines { vs_defines }
includedirs { vs_includedirs }
libdirs { vs_libdirs }
-- Configurations built on top of GCC/G++
configuration { "linux or codelite or codeblocks or gmake" }
buildoptions
{
"-std=c++0x",
"-pedantic",
"-W",
"-Wall",
"-Wextra",
"-Wno-unused-parameter"
}
links
{
"lua5.1",
"xml2",
"gmp",
"sqlite3",
"mysqlclient",
"boost_system",
"boost_thread",
"boost_regex",
"pthread"
}
-- Mac OS X support for Xcode.
configuration { "macosx" }
links
{
"lua",
"xml2",
"mysqlclient",
"boost_thread-mt",
"boost_regex-mt",
"boost_system"
}
-- Get rid of the build folder along with the generated files
if _ACTION == "clean" then
os.rmdir("build")
end