Skip to content

Commit 2a77c13

Browse files
committed
fix: dairlib dependency fix
1 parent 207d6ab commit 2a77c13

File tree

4 files changed

+41
-6
lines changed

4 files changed

+41
-6
lines changed

BUILD.bazel

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,28 @@ LIBC3_COMPONENTS = [
22
"//core:core",
33
"//multibody:multibody",
44
"//systems:systems",
5-
"//lcmtypes:lcmt_c3",
65
]
76

87
package(default_visibility = ["//visibility:public"])
98

10-
cc_library(
11-
name = "c3_shared_library",
12-
deps = LIBC3_COMPONENTS,
13-
include_prefix = "c3"
9+
# Filegroup collecting all headers
10+
filegroup(
11+
name = "c3_headers",
12+
srcs = [
13+
"//core:headers",
14+
"//multibody:headers",
15+
"//systems:headers",
16+
],
1417
)
18+
19+
# Combined target that provides both the shared library and headers
20+
cc_library(
21+
name = "libc3",
22+
hdrs = [":c3_headers"], # Changed from srcs to hdrs for headers
23+
deps = LIBC3_COMPONENTS + [
24+
"//lcmtypes:lcmt_c3",
25+
"@drake//:drake_shared_library",
26+
],
27+
include_prefix = "c3",
28+
visibility = ["//visibility:public"],
29+
)

core/BUILD.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ cc_library(
6060
"//tools:with_gurobi": ["@gurobi//:gurobi_cxx"],
6161
"//conditions:default": [],
6262
}),
63+
includes = ['.']
6364
)
6465

6566
cc_library(
@@ -100,4 +101,11 @@ cc_test(
100101
],
101102
)
102103

104+
filegroup(
105+
name = "headers",
106+
srcs = glob([
107+
"*.h",
108+
]),
109+
visibility = ["//visibility:public"],
110+
)
103111

multibody/BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,12 @@ cc_test(
5656
":lcs_factory",
5757
"@gtest//:main",
5858
],
59+
)
5960

61+
filegroup(
62+
name = "headers",
63+
srcs = glob([
64+
"*.h",
65+
]),
66+
visibility = ["//visibility:public"],
6067
)

systems/BUILD.bazel

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ cc_library(
160160
],
161161
)
162162

163-
exports_files(glob(["**/*.h", "**/*.hpp"]),
163+
filegroup(
164+
name = "headers",
165+
srcs = glob([
166+
"*.h",
167+
"**/*.h",
168+
]),
164169
visibility = ["//visibility:public"],
165170
)

0 commit comments

Comments
 (0)