-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
92 lines (86 loc) · 2.01 KB
/
BUILD.bazel
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
package(default_visibility = ["//visibility:public"])
genrule(
name = "make_version",
outs = ["version.h"],
cmd = """sed -e 's/ / "/g' -e 's/$$/"\\n/g' -e "s/^/#define /g" bazel-out/volatile-status.txt > $@""",
stamp = 1,
)
cc_library(
name = "app",
srcs = [
"app.cc",
],
hdrs = [
"app.h",
"version.h",
],
linkopts = [
"-lSDL2main",
"-lSDL2",
"-lSDL2_image",
"-lSDL2_mixer",
"-lSDL2_gfx",
],
deps = [
"//imwidget:base",
"//imwidget:error_dialog",
"//util:browser",
"//util:fpsmgr",
"//util:os",
"@com_google_absl//absl/log",
"@com_github_imgui//:imgui",
"@com_github_igfd//:igfd",
"@com_github_implot//:implot",
# TODO(cfrantz): on ubuntu 16 with MIR, there is a library conflict
# between MIR (linked with protobuf 2.6.1) and this program,
# which builds with protbuf 3.x.x. A temporary workaround is to
# not link with nfd (native-file-dialog).
#"//external:nfd",
],
)
filegroup(
name = "content",
srcs = glob(["content/*.textpb"]),
)
cc_binary(
name = "application",
srcs = [
"main.cc",
],
linkopts = select({
#":windows": [
# "-lpthread",
# "-lm",
# "-lopengl32",
# "-ldinput8",
# "-ldxguid",
# "-ldxerr8",
# "-luser32",
# "-lgdi32",
# "-lwinmm",
# "-limm32",
# "-lole32",
# "-loleaut32",
# "-lshell32",
# "-lversion",
# "-luuid",
#],
"//conditions:default": [
"-lpthread",
"-lm",
"-lGL",
],
}),
deps = [
":app",
"//util:config",
"@com_google_absl//absl/flags:parse",
"@com_google_absl//absl/flags:usage",
],
)
#pkg_winzip(
# name = "application-windows",
# files = [
# ":application",
# ],
#)