Skip to content

Commit

Permalink
Prefix library names of vendored external shared libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Feb 23, 2018
1 parent 9e4f477 commit 419148d
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions tools/workspace/bullet/package-create-cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"Components": {
"BulletCollision": {
"Type": "dylib",
"Location": "@prefix@/lib/libBulletCollision.so",
"Location": "@prefix@/lib/libdrake_bullet_collision.so",
"Includes": ["@prefix@/include/bullet"],
"Requires": [":LinearMath"]
},
"LinearMath": {
"Type": "dylib",
"Location": "@prefix@/lib/libLinearMath.so",
"Location": "@prefix@/lib/libdrake_bullet_linear_math.so",
"Definitions": ["BT_USE_DOUBLE_PRECISION"],
"Includes": ["@prefix@/include/bullet"]
}
Expand Down
12 changes: 6 additions & 6 deletions tools/workspace/bullet/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LINEAR_MATH_HDRS = glob(["src/LinearMath/**/*.h"])
LINEAR_MATH_DEFINES = ["BT_USE_DOUBLE_PRECISION"]

cc_binary(
name = "libLinearMath.so",
name = "libdrake_bullet_linear_math.so",
srcs = glob(["src/LinearMath/**/*.cpp"]) + LINEAR_MATH_HDRS,
copts = BULLET_COPTS,
defines = LINEAR_MATH_DEFINES,
Expand All @@ -37,7 +37,7 @@ cc_binary(

cc_library(
name = "LinearMath",
srcs = ["libLinearMath.so"],
srcs = ["libdrake_bullet_linear_math.so"],
hdrs = LINEAR_MATH_HDRS,
copts = BULLET_COPTS,
defines = LINEAR_MATH_DEFINES,
Expand All @@ -50,7 +50,7 @@ BULLET_COLLISION_HDRS = glob(["src/BulletCollision/**/*.h"]) + [

# BulletCollision contains LGPL code so only build shared library.
cc_binary(
name = "libBulletCollision.so",
name = "libdrake_bullet_collision.so",
srcs = glob(["src/BulletCollision/**/*.cpp"]) + BULLET_COLLISION_HDRS,
copts = BULLET_COPTS,
includes = BULLET_INCLUDES,
Expand All @@ -61,7 +61,7 @@ cc_binary(

cc_library(
name = "BulletCollision",
srcs = ["libBulletCollision.so"],
srcs = ["libdrake_bullet_collision.so"],
hdrs = BULLET_COLLISION_HDRS,
copts = BULLET_COPTS,
includes = BULLET_INCLUDES,
Expand All @@ -79,8 +79,8 @@ install_cmake_config(package = "Bullet")
install(
name = "install",
targets = [
":libBulletCollision.so",
":libLinearMath.so",
":libdrake_bullet_collision.so",
":libdrake_bullet_linear_math.so",
],
hdr_dest = "include/bullet",
hdr_strip_prefix = BULLET_INCLUDES,
Expand Down
2 changes: 1 addition & 1 deletion tools/workspace/ignition_math/package-create-cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Components": {
"ignition-math4": {
"Type": "dylib",
"Location": "@prefix@/lib/libignition_math.so",
"Location": "@prefix@/lib/libdrake_ignition_math4.so",
"Includes": ["@prefix@/include/ignition-math4"]
}
},
Expand Down
6 changes: 3 additions & 3 deletions tools/workspace/ignition_math/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public_headers = public_headers_no_gen + [
# upstream's explicitly listed sources plus private headers. The explicitly
# listed hdrs= matches upstream's public headers.
cc_binary(
name = "libignition_math.so",
name = "libdrake_ignition_math4.so",
srcs = [
"src/Angle.cc",
"src/Box.cc",
Expand Down Expand Up @@ -175,7 +175,7 @@ cc_binary(

cc_library(
name = "ignition_math",
srcs = ["libignition_math.so"],
srcs = ["libdrake_ignition_math4.so"],
hdrs = public_headers,
includes = ["include"],
visibility = ["//visibility:public"],
Expand All @@ -195,7 +195,7 @@ install_cmake_config(package = CMAKE_PACKAGE)
install(
name = "install",
workspace = CMAKE_PACKAGE,
targets = [":libignition_math.so"],
targets = [":libdrake_ignition_math4.so"],
hdrs = public_headers,
hdr_dest = "include/" + CMAKE_PACKAGE,
hdr_strip_prefix = ["include"],
Expand Down
2 changes: 1 addition & 1 deletion tools/workspace/ignition_rndf/package-create-cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"Components": {
"ignition-rndf0": {
"Type": "dylib",
"Location": "@prefix@/lib/libignition_rndf.so",
"Location": "@prefix@/lib/libdrake_ignition_rndf0.so",
"Includes": ["@prefix@/include/ignition-rndf0"],
"Requires": ["ignition-math4:ignition-math4"]
}
Expand Down
6 changes: 3 additions & 3 deletions tools/workspace/ignition_rndf/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public_headers = public_headers_no_gen + [
]

cc_binary(
name = "libignition_rndf.so",
name = "libdrake_ignition_rndf0.so",
srcs = [
"src/Checkpoint.cc",
"src/Exit.cc",
Expand Down Expand Up @@ -152,7 +152,7 @@ cc_binary(

cc_library(
name = "ignition_rndf",
srcs = ["libignition_rndf.so"],
srcs = ["libdrake_ignition_rndf0.so"],
hdrs = public_headers,
includes = ["include"],
visibility = ["//visibility:public"],
Expand All @@ -176,7 +176,7 @@ install_cmake_config(package = CMAKE_PACKAGE)
install(
name = "install",
workspace = CMAKE_PACKAGE,
targets = [":libignition_rndf.so"],
targets = [":libdrake_ignition_rndf0.so"],
hdrs = public_headers,
hdr_dest = "include/" + CMAKE_PACKAGE,
hdr_strip_prefix = ["include"],
Expand Down
2 changes: 1 addition & 1 deletion tools/workspace/lcm/package-create-cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"lcm": {
"Type": "dylib",
"Includes": ["@prefix@/include/lcm"],
"Location": "@prefix@/lib/liblcm.so",
"Location": "@prefix@/lib/libdrake_lcm.so",
"Requires": [":lcm-coretypes"]
},
"lcm-gen": {
Expand Down
6 changes: 3 additions & 3 deletions tools/workspace/lcm/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ LCM_PUBLIC_HEADER_INCLUDES = [
# linked dynamically. The `name = "lcm"` rule below provides the compile-time
# artifact that combines the shared library with its headers.
cc_binary(
name = "liblcm.so",
name = "libdrake_lcm.so",
srcs = [
# Sources
"lcm/eventlog.c",
Expand Down Expand Up @@ -107,7 +107,7 @@ cc_binary(
# This is the compile-time target for liblcm. See above for details.
cc_library(
name = "lcm",
srcs = ["liblcm.so"],
srcs = ["libdrake_lcm.so"],
hdrs = LCM_PUBLIC_HEADERS,
includes = LCM_PUBLIC_HEADER_INCLUDES,
)
Expand Down Expand Up @@ -303,7 +303,7 @@ install(
":lcm-logplayer-gui-launcher",
":lcm-spy",
":lcm-spy-launcher",
":liblcm.so",
":libdrake_lcm.so",
],
py_strip_prefix = ["lcm-python"],
hdrs = LCM_PUBLIC_HEADERS,
Expand Down
6 changes: 3 additions & 3 deletions tools/workspace/osqp/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cmake_configure_file(
)

cc_binary(
name = "libosqp.so",
name = "libdrake_osqp.so",
srcs = glob([
"lin_sys/*.c",
"lin_sys/*.h",
Expand Down Expand Up @@ -67,7 +67,7 @@ cc_binary(

cc_library(
name = "osqp",
srcs = [":libosqp.so"],
srcs = [":libdrake_osqp.so"],
hdrs = glob([
"include/*.h",
]) + ["include/glob_opts.h"],
Expand All @@ -78,7 +78,7 @@ cc_library(

install(
name = "install",
targets = [":libosqp.so"],
targets = [":libdrake_osqp.so"],
docs = [
"LICENSE",
"lin_sys/direct/suitesparse/ldl/LICENSE",
Expand Down
6 changes: 3 additions & 3 deletions tools/workspace/scs/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SCS_HDRS = glob(["include/*.h"]) + ["linsys/amatrix.h"]
# shared library for :scsdir.

cc_binary(
name = "libscsdir.so",
name = "libdrake_scsdir.so",
srcs = SCS_HDRS + glob([
"linsys/*.c",
"linsys/common.h",
Expand Down Expand Up @@ -54,15 +54,15 @@ cc_binary(

cc_library(
name = "scsdir",
srcs = [":libscsdir.so"],
srcs = [":libdrake_scsdir.so"],
hdrs = SCS_HDRS,
defines = ["USE_LAPACK=1"],
includes = ["include"],
)

install(
name = "install",
targets = [":libscsdir.so"],
targets = [":libdrake_scsdir.so"],
docs = [
"LICENSE.txt",
"linsys/direct/external/AMD_README.txt",
Expand Down

0 comments on commit 419148d

Please sign in to comment.