From c1cabbb01d9d5895b914440abe80938774418010 Mon Sep 17 00:00:00 2001 From: Jeremy Nimmer Date: Thu, 22 Aug 2024 10:58:20 -0700 Subject: [PATCH] [topology] Tidy up bazel library spelling (#21841) --- multibody/plant/BUILD.bazel | 2 +- multibody/topology/BUILD.bazel | 16 +++++++++++----- multibody/tree/BUILD.bazel | 4 ++-- tools/install/libdrake/build_components.bzl | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/multibody/plant/BUILD.bazel b/multibody/plant/BUILD.bazel index 459efaf9ac41..7291bcd09405 100644 --- a/multibody/plant/BUILD.bazel +++ b/multibody/plant/BUILD.bazel @@ -147,7 +147,7 @@ drake_cc_library( "//multibody/contact_solvers/sap", "//multibody/fem", "//multibody/hydroelastics:hydroelastic_engine", - "//multibody/topology:multibody_topology", + "//multibody/topology", "//multibody/tree", "//systems/framework:diagram_builder", "//systems/framework:leaf_system", diff --git a/multibody/topology/BUILD.bazel b/multibody/topology/BUILD.bazel index ad2eed7593ee..692d4469d9fd 100644 --- a/multibody/topology/BUILD.bazel +++ b/multibody/topology/BUILD.bazel @@ -6,12 +6,18 @@ load( "drake_cc_package_library", ) -package( - default_visibility = ["//visibility:public"], +package(default_visibility = ["//visibility:private"]) + +drake_cc_package_library( + name = "topology", + visibility = ["//visibility:public"], + deps = [ + ":impl", + ], ) drake_cc_library( - name = "multibody_topology", + name = "impl", srcs = [ "link_joint_graph.cc", "link_joint_graph_debug.cc", @@ -44,7 +50,7 @@ drake_cc_library( drake_cc_googletest( name = "link_joint_graph_test", deps = [ - ":multibody_topology", + ":impl", "//common/test_utilities:expect_throws_message", ], ) @@ -52,7 +58,7 @@ drake_cc_googletest( drake_cc_googletest( name = "spanning_forest_test", deps = [ - ":multibody_topology", + ":impl", "//common:temp_directory", "//common/test_utilities:expect_throws_message", ], diff --git a/multibody/tree/BUILD.bazel b/multibody/tree/BUILD.bazel index fa6a916b1a1a..63f506b1f83d 100644 --- a/multibody/tree/BUILD.bazel +++ b/multibody/tree/BUILD.bazel @@ -49,7 +49,7 @@ drake_cc_library( ], deps = [ ":multibody_tree_indexes", - "//multibody/topology:multibody_topology", + "//multibody/topology", ], ) @@ -183,7 +183,7 @@ drake_cc_library( "//common:string_container", "//common:unused", "//math:geometric_transform", - "//multibody/topology:multibody_topology", + "//multibody/topology", "//systems/framework:leaf_system", ], ) diff --git a/tools/install/libdrake/build_components.bzl b/tools/install/libdrake/build_components.bzl index 024a58a221d7..e9118d43da14 100644 --- a/tools/install/libdrake/build_components.bzl +++ b/tools/install/libdrake/build_components.bzl @@ -70,7 +70,7 @@ LIBDRAKE_COMPONENTS = [ "//multibody/plant", "//multibody/plant:contact_results_to_lcm", # unpackaged "//multibody/rational", - "//multibody/topology:multibody_topology", # unpackaged + "//multibody/topology", "//multibody/tree", "//multibody/triangle_quadrature", "//perception",