-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWORKSPACE
executable file
·95 lines (74 loc) · 2.49 KB
/
WORKSPACE
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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
http_archive(
name = "com_google_protobuf",
strip_prefix = "protobuf-3.6.1.3",
urls = ["https://github.com/google/protobuf/archive/v3.6.1.3.zip"],
)
http_archive(
name = "gtest",
url = "https://github.com/google/googletest/archive/release-1.7.0.zip",
build_file = "@//:gmock.BUILD",
strip_prefix = "googletest-release-1.7.0",
)
git_repository(
name = "com_github_nelhage_rules_boost",
commit = "6d6fd834281cb8f8e758dd9ad76df86304bf1869",
remote = "https://github.com/nelhage/rules_boost",
)
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
boost_deps()
new_local_repository(
name = "kronoslib",
# pkg-config --variable=libdir kronosapi
path = "/usr/lib",
build_file_content = """
cc_library(
name = "kronosapi",
srcs = ["libkronosapi.so"],
visibility = ["//visibility:public"],
alwayslink = 1,
)
""",
)
new_local_repository(
name = "modbuslib",
# pkg-config --variable=libdir modbusapi
path = "/usr/local/lib",
build_file_content = """
cc_library(
name = "modbusapi",
srcs = ["libmodbus.so"],
visibility = ["//visibility:public"],
alwayslink = 1,
)
""",
)
http_archive(
name = "build_stack_rules_proto",
urls = ["https://github.com/stackb/rules_proto/archive/d86ca6bc56b1589677ec59abfa0bed784d6b7767.tar.gz"],
sha256 = "36f11f56f6eb48a81eb6850f4fb6c3b4680e3fc2d3ceb9240430e28d32c47009",
strip_prefix = "rules_proto-d86ca6bc56b1589677ec59abfa0bed784d6b7767",
)
load("@build_stack_rules_proto//cpp:deps.bzl", "cpp_grpc_compile")
cpp_grpc_compile()
load("@build_stack_rules_proto//cpp:deps.bzl", "cpp_grpc_library")
cpp_grpc_library()
load("@build_stack_rules_proto//python:deps.bzl", "python_grpc_library")
python_grpc_library()
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")
pip_repositories()
pip_import(
name = "protobuf_py_deps",
requirements = "@build_stack_rules_proto//python/requirements:protobuf.txt",
)
load("@protobuf_py_deps//:requirements.bzl", protobuf_pip_install = "pip_install")
protobuf_pip_install()
pip_import(
name = "grpc_py_deps",
requirements = "@build_stack_rules_proto//python:requirements.txt",
)
load("@grpc_py_deps//:requirements.bzl", grpc_pip_install = "pip_install")
grpc_pip_install()