-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgenie.lua
71 lines (60 loc) · 1.82 KB
/
genie.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
ROOT_DIR = path.getabsolute('.')
BGFX_DIR = path.join(ROOT_DIR, '3rdparty/bgfx')
BX_DIR = path.join(ROOT_DIR, '3rdparty/bx')
BIMG_DIR = path.join(ROOT_DIR, '3rdparty/bimg')
SPDLOG_DIR = path.join(ROOT_DIR, '3rdparty/spdlog')
local BUILD_DIR = ".build"
local LIB_DIR = ".build/lib"
solution('bgfx-starter')
configurations({'Debug','Release'})
platforms({'x32','x64','Native'})
language('C++')
startproject('starter')
dofile (path.join(BX_DIR, "scripts/toolchain.lua"))
if not toolchain(BUILD_DIR, LIB_DIR) then
return -- no action specified
end
-- project bgfx
function copyLib() end
dofile (path.join(BGFX_DIR, 'scripts/bgfx.lua'))
bgfxProject("", "StaticLib", {})
-- project example-common
dofile (path.join(BGFX_DIR, 'scripts/example-common.lua'))
-- project bx
dofile (path.join(BX_DIR, 'scripts/bx.lua'))
-- project bimg
dofile (path.join(BIMG_DIR, 'scripts/bimg.lua'))
dofile (path.join(BIMG_DIR, 'scripts/bimg_decode.lua'))
dofile (path.join(BIMG_DIR, 'scripts/bimg_encode.lua'))
-- project starter
project('starter')
kind('WindowedApp')
files({'src/**.h', 'src/**.cpp'})
includedirs({
path.join(BGFX_DIR, 'include'),
path.join(BGFX_DIR, 'examples/common'),
path.join(BGFX_DIR, '3rdparty'),
path.join(BX_DIR, 'include'),
path.join(BIMG_DIR, 'include'),
path.join(SPDLOG_DIR, 'include')
})
links({
'bx',
'bgfx',
'example-common',
'example-glue'
})
configuration({ "vs20*", "x32 or x64" })
links {
"gdi32",
"psapi",
"bimg",
"bimg_decode",
}
configuration({})
prebuildcommands({
-- 'pushd src & gnumake & popd'
})
-- tools
dofile (path.join(BGFX_DIR, 'scripts/shaderc.lua'))
dofile (path.join(BGFX_DIR, 'scripts/texturec.lua'))