forked from RobotLocomotion/drake-schunk-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
49 lines (40 loc) · 1.97 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
# -*- python -*-
workspace(name = "drake_schunk_driver")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
(DRAKE_COMMIT, DRAKE_CHECKSUM) = (
"b79928f03f94780ef8096a08c109d85cefe428f8",
"ac001ccac82d560b32038585129192e2931857d142db8989116450ec36f3f58f",
)
# Before changing the COMMIT, temporarily uncomment the next line so that Bazel
# displays the suggested new value for the CHECKSUM.
# DRAKE_CHECKSUM = "0" * 64
# Or to build against a local checkout of Drake, at the bash prompt set an
# environment variable before building:
# export SCHUNK_LOCAL_DRAKE_PATH=/home/user/stuff/drake
# Load an environment variable.
load("//:environ.bzl", "environ_repository")
environ_repository(name = "environ", vars = ["SCHUNK_LOCAL_DRAKE_PATH"])
load("@environ//:environ.bzl", SCHUNK_LOCAL_DRAKE_PATH = "SCHUNK_LOCAL_DRAKE_PATH")
# This declares the `@drake` repository as an http_archive from github,
# iff SCHUNK_LOCAL_DRAKE_PATH is unset. When it is set, this declares a
# `@drake_ignored` package which is never referenced, and thus is ignored.
http_archive(
name = "drake" if not SCHUNK_LOCAL_DRAKE_PATH else "drake_ignored",
sha256 = DRAKE_CHECKSUM,
strip_prefix = "drake-{}".format(DRAKE_COMMIT),
urls = [x.format(DRAKE_COMMIT) for x in [
"https://github.com/RobotLocomotion/drake/archive/{}.tar.gz",
]],
)
# This declares the `@drake` repository as a local directory,
# iff SCHUNK_LOCAL_DRAKE_PATH is set. When it is unset, this declares a
# `@drake_ignored` package which is never referenced, and thus is ignored.
local_repository(
name = "drake" if SCHUNK_LOCAL_DRAKE_PATH else "drake_ignored",
path = SCHUNK_LOCAL_DRAKE_PATH,
)
print("Using SCHUNK_LOCAL_DRAKE_PATH={}".format(SCHUNK_LOCAL_DRAKE_PATH)) if SCHUNK_LOCAL_DRAKE_PATH else None # noqa
load("@drake//tools/workspace:default.bzl", "add_default_repositories")
# WARNING: We allow `vtk`, but should take care to avoid linking in multiple
# versions of VTK!
add_default_repositories()