-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathmongoose.lua
42 lines (31 loc) · 884 Bytes
/
mongoose.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
mongoose = {
settings = nil,
}
function mongoose.setup(settings)
if not settings.source then error("Missing source.") end
mongoose.settings = settings
end
function mongoose.import()
if not mongoose.settings then error("Run mongoose.setup first") end
links { "mongoose" }
mongoose.includes()
end
function mongoose.includes()
if not mongoose.settings then error("Run mongoose.setup first") end
includedirs { mongoose.settings.source }
end
function mongoose.project()
if not mongoose.settings then error("Run mongoose.setup first") end
project "mongoose"
language "C"
mongoose.includes()
files
{
path.join(mongoose.settings.source, "*.c"),
path.join(mongoose.settings.source, "*.h"),
}
-- not our code, ignore POSIX usage warnings for now
warnings "Off"
-- always build as static lib, as mongoose doesn't export anything
kind "StaticLib"
end