-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpremake5.lua
45 lines (36 loc) · 1.23 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
PROJECT_GENERATOR_VERSION = 2
newoption({
trigger = "gmcommon",
description = "Sets the path to the garrysmod_common (https://github.com/danielga/garrysmod_common) directory",
value = "path to garrysmod_common directory"
})
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 LANES_DIRECTORY = "lanes/src"
CreateWorkspace({name = "lanes.core"})
CreateProject({serverside = true})
includedirs(LANES_DIRECTORY)
links("lanes")
IncludeLuaShared()
filter("system:linux")
links("pthread")
CreateProject({serverside = false})
includedirs(LANES_DIRECTORY)
links("lanes")
IncludeLuaShared()
filter("system:linux")
links("pthread")
project("lanes")
kind("StaticLib")
warnings("Default")
includedirs(LANES_DIRECTORY)
externalincludedirs(_GARRYSMOD_COMMON_DIRECTORY .. "/include")
files({path.join(LANES_DIRECTORY, "*.c"), path.join(LANES_DIRECTORY, "*.h")})
vpaths({
["Source files/*"] = path.join(LANES_DIRECTORY, "*.c"),
["Header files/*"] = path.join(LANES_DIRECTORY, "*.h")
})
IncludeLuaShared()
filter("system:linux")
defines("_GNU_SOURCE")