forked from danielga/gm_redis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpremake5.lua
75 lines (62 loc) · 2.21 KB
/
premake5.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
PROJECT_GENERATOR_VERSION = 3
newoption({
trigger = "gmcommon",
description = "Sets the path to the garrysmod_common (https://github.com/danielga/garrysmod_common) directory",
value = "path to garrysmod_common directory"
})
externalincludedirs = sysincludedirs
local gmcommon = assert(_OPTIONS.gmcommon or os.getenv("GARRYSMOD_COMMON"),
"you didn't provide a path to your garrysmod_common (https://github.com/danielga/garrysmod_common) directory")
include(gmcommon)
local REDIS_FOLDER = "cpp_redis"
local TACOPIE_FOLDER = "cpp_redis/tacopie"
CreateWorkspace({name = "redis.core"})
CreateProject({serverside = true})
links({"cpp_redis", "tacopie", "pthread"})
sysincludedirs({REDIS_FOLDER .. "/includes", TACOPIE_FOLDER .. "/includes"})
IncludeLuaShared()
filter("system:windows")
links("ws2_32")
CreateProject({serverside = false})
links({"cpp_redis", "tacopie", "pthread"})
sysincludedirs({REDIS_FOLDER .. "/includes", TACOPIE_FOLDER .. "/includes"})
IncludeLuaShared()
filter("system:windows")
links("ws2_32")
project("cpp_redis")
kind("StaticLib")
includedirs({
REDIS_FOLDER .. "/includes",
TACOPIE_FOLDER .. "/includes"
})
files({
REDIS_FOLDER .. "/sources/**.cpp",
REDIS_FOLDER .. "/includes/cpp_redis/**"
})
vpaths({
["Source files/*"] = REDIS_FOLDER .. "/sources/**.cpp",
["Header files/*"] = REDIS_FOLDER .. "/includes/cpp_redis/**"
})
links({"tacopie", "pthread"})
filter("system:windows")
files(REDIS_FOLDER .. "/sources/network/windows_impl/*.cpp")
filter("system:not windows")
files(REDIS_FOLDER .. "/sources/network/unix_impl/*.cpp")
project("tacopie")
kind("StaticLib")
includedirs(TACOPIE_FOLDER .. "/includes")
files({
TACOPIE_FOLDER .. "/sources/utils/*.cpp",
TACOPIE_FOLDER .. "/sources/network/*.cpp",
TACOPIE_FOLDER .. "/sources/network/common/*.cpp",
TACOPIE_FOLDER .. "/includes/tacopie/**"
})
vpaths({
["Source files/*"] = TACOPIE_FOLDER .. "/sources/**.cpp",
["Header files/*"] = TACOPIE_FOLDER .. "/includes/tacopie/**"
})
links("pthread")
filter("system:windows")
files(TACOPIE_FOLDER .. "/sources/network/windows/*.cpp")
filter("system:not windows")
files(TACOPIE_FOLDER .. "/sources/network/unix/*.cpp")