-
Notifications
You must be signed in to change notification settings - Fork 1
/
genie.lua
69 lines (56 loc) · 1.83 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
-- premake5.lua
DEPS_DIR = "../trussdeps"
-- paths
BGFX_DIR = path.join(DEPS_DIR, "bgfx")
BX_DIR = path.join(DEPS_DIR, "bx")
TERRA_DIR = path.join(DEPS_DIR, "terra")
SDL_DIR = path.join(DEPS_DIR, "sdl")
PHYSFS_DIR = path.join(DEPS_DIR, "physfs")
STB_DIR = path.join(DEPS_DIR, "stb")
solution "truss"
configurations{ "Debug", "Release" }
platforms{"x64"} -- it's 2015, 64bit is only option
--architecture "x64" -- needed in premake5 but not genie?
location "build"
startproject "truss"
project "truss"
kind "ConsoleApp"
language "C++"
targetdir "."
location "build"
local nvg = "src/addons/bgfx_nanovg/"
local ws = "src/addons/websocket_client/"
files{ "src/*.cpp", "src/*.h", -- core
nvg .. "*.cpp", nvg .. "*.h", -- nanovg
ws .. "*.cpp", ws .. "*.h", ws .. "*.hpp" -- websocket
}
-- link in bgfx, bx, terra, and SDL2
includedirs{
path.join(BGFX_DIR, "include"),
path.join(TERRA_DIR, "include/terra"),
path.join(SDL_DIR, "include"),
--path.join(BGFX_DIR, "3rdparty"),
path.join(BX_DIR, "include"),
PHYSFS_DIR,
STB_DIR
}
libdirs{
path.join(BGFX_DIR, "lib"),
path.join(TERRA_DIR, "lib"),
path.join(SDL_DIR, "lib/x64"),
path.join(PHYSFS_DIR, "lib")
}
links{
"terra", "lua51",
"SDL2", "SDL2main",
"bgfx-shared-libRelease",
"physfs"
}
configuration "Linux"
links{"GL", "GLU", "X11"} -- otherwise linker will complain that bgfx is missing things
configuration "Debug"
defines{ "DEBUG" }
flags{ "Symbols" }
configuration "Release"
defines{ "NDEBUG" }
flags { "OptimizeSpeed" }