-
Notifications
You must be signed in to change notification settings - Fork 4
/
premake.lua
130 lines (121 loc) · 2.97 KB
/
premake.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
121
122
123
124
125
126
127
128
129
130
--solution "jwEngine"
workspace "jwServer"
configurations { "Debug", "Release" }
platforms {'x32', 'x64'}
--If no system is specified, Premake will identify and target the current operating system.
--system { "windows", "linux" }
filter "system:windows"
defines {'_CRT_SECURE_NO_WARNINGS'}
characterset ("MBCS") --Multi-byte Character Set; currently Visual Studio only
-- Debug and Release
filter { "configurations:Debug" }
defines { "DEBUG", "_DEBUG" }
symbols "On"
filter { "configurations:Release" }
defines { "NDEBUG" }
optimize "On"
-- x32 and x64
filter { "platforms:x32" }
architecture "x86"
filter { "platforms:x64" }
architecture "x86_64"
project "libcore"
location "src"
includedirs{
"dependencies",
"dependencies/asio/include",
"dependencies/openssl"
}
language "C++"
cppdialect "c++17"
kind "StaticLib"
targetdir "libs"
objdir "obj/core"
local codedir = "src/core";
files { codedir.."/*.h"}
files { codedir.."/*.c", codedir.."/*.cc", codedir.."/*.cpp"}
--removefiles {codedir .. "Database/*.cpp"}
removefiles {codedir .. "/DumpGdb.cpp"}
filter "configurations:Debug"
targetname "d_libcore"
filter "configurations:Release"
targetname "r_libcore"
project "web"
location "src"
includedirs{
"dependencies",
"dependencies/asio/include",
"dependencies/openssl",
"src/core",
"src/common"
}
language "C++"
cppdialect "c++17"
kind "ConsoleApp"
targetdir "bin"
objdir "obj/web"
local codedir = "src/web";
files { codedir.."/*.h",codedir.."/*.c", codedir.."/*.cc", codedir.."/*.cpp"}
files { "src/common/*.*"}
removefiles {codedir .. "/DumpGdb.cpp"}
targetname "web"
libdirs{"libs"}
filter "configurations:Debug"
links {'d_libcore'}
filter "configurations:Release"
links {'r_libcore'}
project "game"
location "src"
includedirs{
"dependencies",
"dependencies/asio/include",
"dependencies/openssl",
"src/core",
"src/common",
"src/db_share"
}
language "C++"
cppdialect "c++17"
kind "ConsoleApp"
targetdir "bin"
objdir "obj/game"
local codedir = "src/game";
files { codedir.."/*.h",codedir.."/*.c", codedir.."/*.cc", codedir.."/*.cpp"}
files { "src/common/*.*"}
files { "src/db_share/*.*"}
removefiles {codedir .. "/DumpGdb.cpp"}
targetname "game"
libdirs{"libs"}
filter "configurations:Debug"
links {'d_libcore'}
filter "configurations:Release"
links {'r_libcore'}
project "db"
location "src"
includedirs{
"dependencies",
"dependencies/asio/include",
"dependencies/openssl",
"src/core",
"src/common",
"src/db_share"
}
language "C++"
cppdialect "c++17"
kind "ConsoleApp"
targetdir "bin"
objdir "obj/db"
local codedir = "src/db";
files { "src/core/Database/*.*"}
files { codedir.."/*.h",codedir.."/*.c", codedir.."/*.cc", codedir.."/*.cpp"}
files { "src/common/*.*"}
files { "src/db_share/*.*"}
removefiles {codedir .. "/DumpGdb.cpp"}
targetname "db"
libdirs{"libs"}
--links
links{'libmysqlclient'}
filter "configurations:Debug"
links {'d_libcore'}
filter "configurations:Release"
links {'r_libcore'}