Skip to content

Commit

Permalink
[workspace] Remove msgpack boost dependency (RobotLocomotion#17286)
Browse files Browse the repository at this point in the history
* [workspace] Remove msgpack boost dependency
  • Loading branch information
jwnimmer-tri authored and aykut-tri committed Jun 1, 2022
1 parent e33332b commit 28a16c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions geometry/meshcat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
#include "drake/common/unused.h"
#include "drake/geometry/meshcat_types.h"

#ifdef BOOST_VERSION
# error Drake should be using the non-boost flavor of msgpack.
#endif

// Steal one function declaration from usockets/src/internal/internal.h.
extern "C" {
void us_internal_free_closed_sockets(struct us_loop_t*);
Expand Down
8 changes: 5 additions & 3 deletions tools/workspace/msgpack/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def _impl(repo_ctx):
prefix = "{}/opt/msgpack-cxx/".format(os_result.homebrew_prefix)
repo_ctx.symlink("{}/include".format(prefix), "msgpack")

hdrs_patterns = ["msgpack/**/*.hpp"]
hdrs_patterns = [
"msgpack/**/*.h",
"msgpack/**/*.hpp",
]

file_content = """# -*- python -*-
Expand All @@ -40,9 +43,8 @@ cc_library(
name = "msgpack",
hdrs = glob({}),
includes = ["msgpack"],
defines = ["MSGPACK_NO_BOOST"],
visibility = ["//visibility:public"],
deps = ["@boost//:boost_headers"],
)
""".format(hdrs_patterns)

Expand Down

0 comments on commit 28a16c5

Please sign in to comment.