Skip to content

Commit

Permalink
[workspace] No need to install spdlog CMake files (RobotLocomotion#17287
Browse files Browse the repository at this point in the history
)

* [workspace] No need to install spdlog CMake files

We only build from source in wheel builds, which don't care about this.
  • Loading branch information
jwnimmer-tri authored and aykut-tri committed Jun 1, 2022
1 parent cec2d87 commit 87f645b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 123 deletions.
8 changes: 0 additions & 8 deletions tools/workspace/spdlog/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@

load("//tools/lint:lint.bzl", "add_lint_tests")

exports_files(
[
"spdlog-config.cmake",
"spdlog-config-version.cmake",
],
visibility = ["@spdlog//:__pkg__"],
)

add_lint_tests()
18 changes: 1 addition & 17 deletions tools/workspace/spdlog/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
load(
"@drake//tools/install:install.bzl",
"install",
"install_files",
)

licenses(["notice"]) # MIT
Expand Down Expand Up @@ -92,27 +91,12 @@ cc_library(
visibility = ["//visibility:public"],
)

CMAKE_PACKAGE = "spdlog"

install_files(
name = "install_cmake_config",
dest = "lib/cmake/{}".format(CMAKE_PACKAGE),
files = [
"@drake//tools/workspace/spdlog:{}-config.cmake".format(CMAKE_PACKAGE), # noqa
"@drake//tools/workspace/spdlog:{}-config-version.cmake".format(CMAKE_PACKAGE), # noqa
],
strip_prefix = ["**/"],
allowed_externals = ["@drake//:.bazelproject"],
visibility = ["//visibility:private"],
)

install(
name = "install",
targets = [":libdrake_spdlog.so"],
hdr_dest = "include/" + CMAKE_PACKAGE,
hdr_dest = "include/spdlog",
hdr_strip_prefix = ["include"],
hdrs = _HDRS,
docs = ["LICENSE"],
deps = [":install_cmake_config"],
visibility = ["//visibility:public"],
)
6 changes: 1 addition & 5 deletions tools/workspace/spdlog/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _impl(repo_ctx):

spdlog_repository = repository_rule(
attrs = {
# The next two attributes are used only when we take the branch for
# The next several attributes are used only when we take the branch for
# setup_pkg_config_repository in the above logic.
"modname": attr.string(
default = "spdlog",
Expand All @@ -55,10 +55,6 @@ install(name = "install")
# Here, we elect to use the same version as Ubuntu 20.04, even
# though it is not the newest revision. Sticking with a single,
# older revision helps reduce spurious CI failures.
#
# In the unlikely event that you update the version here, fix up
# the two spdlog-*.cmake files in this directory, and revisit all
# of the version compatibility matrix in spdlog/repository.bzl.
default = "v1.5.0",
),
"commit_pin": attr.int(
Expand Down
19 changes: 0 additions & 19 deletions tools/workspace/spdlog/spdlog-config-version.cmake

This file was deleted.

74 changes: 0 additions & 74 deletions tools/workspace/spdlog/spdlog-config.cmake

This file was deleted.

0 comments on commit 87f645b

Please sign in to comment.