-
Notifications
You must be signed in to change notification settings - Fork 7
/
WORKSPACE
50 lines (41 loc) · 1.96 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
# -*- python -*-
workspace(name = "drake_schunk_driver")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
(DRAKE_COMMIT, DRAKE_CHECKSUM) = (
"v1.20.0",
"e343bc558f840be17c05053c6fc3fff899a3bf4540f3b285f6cd7ca5937f7b46",
)
# Before changing the COMMIT, temporarily uncomment the next line so that Bazel
# displays the suggested new value for the CHECKSUM.
# DRAKE_CHECKSUM = "0" * 64
DRAKE_STRIP_PREFIX = "drake-1.20.0"
# 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_STRIP_PREFIX,
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()