forked from EVerest/everest-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
86 lines (82 loc) · 2.35 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
genrule(
name = "compile_time_settings",
outs = ["include/everest/compile_time_settings.hpp"],
cmd = """
echo "#define EVEREST_INSTALL_PREFIX \\"/usr\\"" > $@
echo "#define EVEREST_NAMESPACE (\\"everest\\")" >> $@
""",
)
cc_library(
name = "framework",
srcs = glob(["lib/*.cpp"]),
hdrs = glob(["include/**/*.hpp"]) + [":compile_time_settings"],
copts = ["-std=c++17"],
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = [
"@boost//:program_options",
"@boost//:uuid",
"@com_github_HowardHinnant_date//:date",
"@com_github_LiamBindle_mqtt-c//:libmqtt",
"@com_github_biojppm_rapidyaml//:ryml",
"@com_github_everest_liblog//:liblog",
"@com_github_fmtlib_fmt//:fmt",
"@com_github_nlohmann_json//:json",
"@com_github_pboettch_json-schema-validator//:json-schema-validator",
],
)
cc_library(
name = "controller-ipc",
srcs = glob(["src/controller/*.cpp"]),
hdrs = glob(["src/controller/*.hpp"]),
copts = ["-std=c++17"],
strip_include_prefix = "src",
deps = [
":framework",
"@com_github_biojppm_rapidyaml//:ryml",
"@com_github_everest_liblog//:liblog",
"@com_github_fmtlib_fmt//:fmt",
"@com_github_nlohmann_json//:json",
"@com_github_warmcatt_libwebsockets//:libwebsockets",
],
)
cc_binary(
name = "controller",
srcs = glob(
[
"src/controller/*.cpp",
"src/controller/*.hpp",
],
exclude = [
"src/controller/ipc.cpp",
"src/controller/ipc.hpp",
],
),
copts = ["-std=c++17"],
deps = [
":controller-ipc",
":framework",
"@com_github_biojppm_rapidyaml//:ryml",
"@com_github_everest_liblog//:liblog",
"@com_github_fmtlib_fmt//:fmt",
"@com_github_warmcatt_libwebsockets//:libwebsockets",
],
)
cc_binary(
name = "manager",
srcs = glob(
[
"src/*.cpp",
"src/*.hpp",
],
),
visibility = ["//visibility:public"],
deps = [
":controller-ipc",
":framework",
"@boost//:program_options",
"@com_github_everest_liblog//:liblog",
"@com_github_fmtlib_fmt//:fmt",
"@com_github_pboettch_json-schema-validator//:json-schema-validator",
],
)