With https://github.com/ros2/rcl_logging/pull/102, the dependency of rcl_logging_spdlog upon rcl_logging_interface was removed for downstream users. The reasoning behind the PR makes sense but the library still has one public dependency on rcl_logging_interface, defined here.
This means that when one calls find_package(rcl_logging_spdlog REQUIRED) in an isolated setting*, the rcl_logging_spdlog library links to an unknown library.
I think this can be simply addressed by limiting the link to the build interface, i.e.:
target_link_libraries(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:rcl_logging_interface::rcl_logging_interface>)
or by making this link private and linking the test with rcl_logging_interface explicitly.
*note: I realize this not a very common scenario, we came across this issue because we use these Bazel rules which uses CMake in this way to scrape underlying colcon workspace.
Thanks in advance for taking this into consideration and have a good day!
Hello,
With https://github.com/ros2/rcl_logging/pull/102, the dependency of
rcl_logging_spdlog
uponrcl_logging_interface
was removed for downstream users. The reasoning behind the PR makes sense but the library still has one public dependency onrcl_logging_interface
, defined here.This means that when one calls
find_package(rcl_logging_spdlog REQUIRED)
in an isolated setting*, thercl_logging_spdlog
library links to an unknown library.I think this can be simply addressed by limiting the link to the build interface, i.e.:
or by making this link private and linking the test with
rcl_logging_interface
explicitly.*note: I realize this not a very common scenario, we came across this issue because we use these Bazel rules which uses CMake in this way to scrape underlying colcon workspace.
Thanks in advance for taking this into consideration and have a good day!