-
Notifications
You must be signed in to change notification settings - Fork 19
/
BUILD.bazel
104 lines (99 loc) · 2.95 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
93
94
95
96
97
98
99
100
101
102
103
104
genrule(
name = "compile_time_settings",
outs = ["include/everest/compile_time_settings.hpp"],
cmd = """
echo "#define EVEREST_INSTALL_PREFIX \\"/usr\\"" > $@
echo "#define EVEREST_NAMESPACE (\\"everest\\")" >> $@
""",
)
genrule(
name = "version_information",
outs = ["include/generated/version_information.hpp"],
cmd = """
echo "#pragma once" > $@
echo "#define PROJECT_NAME \\"everest-framework\\"" >> $@
echo "#define PROJECT_DESCRIPTION \\"\\"" >> $@
echo "#define PROJECT_VERSION \\"\\"" >> $@
echo "#define GIT_VERSION \\"\\"" >> $@
""",
)
cc_library(
name = "framework",
srcs = glob(["lib/**/*.cpp"]),
hdrs = glob(["include/**/*.hpp"]) + [":compile_time_settings", ":version_information"],
copts = ["-std=c++17"],
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = [
"@//third-party/bazel:boost_program_options",
"@//third-party/bazel: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",
],
# See https://github.com/HowardHinnant/date/issues/324
local_defines = [
"BUILD_TZ_LIB=ON",
"USE_SYSTEM_TZ_DB=ON",
"USE_OS_TZDB=1",
"USE_AUTOLOAD=0",
"HAS_REMOTE_API=0",
],
)
cc_library(
name = "controller-ipc",
srcs = ["src/controller/ipc.cpp"],
hdrs = ["src/controller/ipc.hpp"],
copts = ["-std=c++17"],
strip_include_prefix = "src",
deps = [
"@com_github_nlohmann_json//:json",
],
)
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 = [
"@com_github_biojppm_rapidyaml//:ryml",
"@com_github_everest_liblog//:liblog",
"@com_github_fmtlib_fmt//:fmt",
"@com_github_warmcatt_libwebsockets//:libwebsockets",
"@everest-framework//:controller-ipc",
"@everest-framework//:framework",
"@libcap//:libcap",
],
)
cc_binary(
name = "manager",
copts = ["-std=c++17"],
srcs = glob(
[
"src/*.cpp",
"src/*.hpp",
],
),
visibility = ["//visibility:public"],
deps = [
"@//third-party/bazel:boost_program_options",
"@com_github_everest_liblog//:liblog",
"@com_github_fmtlib_fmt//:fmt",
"@com_github_pboettch_json-schema-validator//:json-schema-validator",
"@everest-framework//:controller-ipc",
"@everest-framework//:framework",
"@//third-party/bazel:libcap",
],
)