-
Notifications
You must be signed in to change notification settings - Fork 30
/
WORKSPACE
64 lines (49 loc) · 2.04 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
# -*- python -*-
workspace(name = "drake_iiwa_driver")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
new_local_repository(
name = "kuka_fri",
build_file = "tools/kuka-fri.BUILD.bazel",
path = "kuka-fri",
)
(DRAKE_COMMIT, DRAKE_CHECKSUM) = (
"v1.12.0",
"b9fc9e07d6741b51b028c9ee3a036be507b90268b75b70a6a1c75e4de04339ad",
)
DRAKE_STRIP_PREFIX = "drake-1.12.0"
# If using commit vs. a tag, uncomment below.
# DRAKE_STRIP_PREFIX = "drake-v{}".format(DRAKE_COMMIT)
# 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 IIWA_LOCAL_DRAKE_PATH=/home/user/stuff/drake
# Load an environment variable.
load("//:environ.bzl", "environ_repository")
environ_repository(
name = "environ",
vars = ["IIWA_LOCAL_DRAKE_PATH"],
)
load("@environ//:environ.bzl", "IIWA_LOCAL_DRAKE_PATH")
# This declares the `@drake` repository as an http_archive from github,
# iff IIWA_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 IIWA_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 IIWA_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 IIWA_LOCAL_DRAKE_PATH else "drake_ignored",
path = IIWA_LOCAL_DRAKE_PATH,
)
print("Using IIWA_LOCAL_DRAKE_PATH={}".format(IIWA_LOCAL_DRAKE_PATH)) if IIWA_LOCAL_DRAKE_PATH else None # noqa
load("@drake//tools/workspace:default.bzl", "add_default_workspace")
add_default_workspace()