Closed ahcorde closed 3 years ago
I'm not sure. I can see benefit in both approaches. Just find packaging the vendor is nice because no matter where the dependency comes from, or what version it is, the vendor package can provide a uniform interface to it. But on the other hand, it's more transparent to find package the actual dependency and use variables from that, it's more "natural", especially if the dependency already provides a CMake module.
There are two cases where always using the vendor is nice, imo:
It also avoids any extra logic needed to use the upstream dependency from being duplicated in downstream packages (the ogre example is good for this again), because this can be encapsulated in the vendor package's logic.
The downside to this is that if you ever wanted to move away from the vendor package in the future, it would be harder to do so. Personally, I don't mind the vendor packages, but that's been a concern in the past.
As far as I can tell, spdlog_vendor does try to use the system library if it is available: https://github.com/ros2/spdlog_vendor/blob/4683c3926f432cdc07ada6792c5e63142d82f000/CMakeLists.txt#L77 . But I'm not sure if that substantially changes the question.
@ahcorde is there anything in regards to rcl_logging
that you think we would do here?
nope, we can close this issue
There are two kind of vendor packages in ROS 2.
My question here is should we try to get rid off the second
find_package
or don't we mind the find the library twice ?Here you can find an example what I mean with "find the library twice":
This question is extensible to poco, yaml, yaml-cpp and the other vendor packages.
@wjwwood and @dirk-thomas what do you think?