forked from bkaradzic/bgfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-common.lua
92 lines (76 loc) · 2.29 KB
/
example-common.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
--
-- Copyright 2010-2020 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--
project ("example-glue")
kind "StaticLib"
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
}
files {
path.join(BGFX_DIR, "examples/common/example-glue.cpp"),
}
project ("example-common")
kind "StaticLib"
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
}
files {
path.join(BGFX_DIR, "3rdparty/meshoptimizer/src/**.cpp"),
path.join(BGFX_DIR, "3rdparty/meshoptimizer/src/**.h"),
path.join(BGFX_DIR, "3rdparty/dear-imgui/**.cpp"),
path.join(BGFX_DIR, "3rdparty/dear-imgui/**.h"),
path.join(BGFX_DIR, "examples/common/**.cpp"),
path.join(BGFX_DIR, "examples/common/**.h"),
}
if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-gnm"),
{ path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_orbis.cpp") }) then
files {
path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_orbis.cpp"),
}
end
if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-nvn"),
{ path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_nx.cpp") }) then
files {
path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_nx.cpp"),
}
end
removefiles {
path.join(BGFX_DIR, "examples/common/example-glue.cpp"),
}
if _OPTIONS["with-sdl"] then
defines {
"ENTRY_CONFIG_USE_SDL=1",
}
includedirs {
"$(SDL2_DIR)/include",
}
end
if _OPTIONS["with-glfw"] then
defines {
"ENTRY_CONFIG_USE_GLFW=1",
}
end
if _OPTIONS["with-wayland"] then
defines {
"ENTRY_CONFIG_USE_WAYLAND=1",
}
end
configuration { "osx or ios* or tvos*" }
files {
path.join(BGFX_DIR, "examples/common/**.mm"),
}
configuration { "winstore* or durango"}
files {
path.join(BGFX_DIR, "examples/common/**.cx"),
}
linkoptions {
"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
}
premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png"