Why are Library dependencies not included for interface libraries?
Open
- Dominant language
- CMake
- Stars
- 125
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
When creating interface libraries that depend on other packages ament explicitly doesn't add necessary build dependencies to the target or export target. If you `target_link_libraries` against an interface library depending on other packages you will get build errors. I am curious why the `if(NOT ARG_INTERFACE)` checks are needed? If you remove them the generated targets as well as cmake exports work properly and carry the associated dependencies.
https://github.com/ament/ament_cmake/blob/3f305a3e1e51f2bd4bd4bf5525a1981c34ff5d08/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake#L127-L157
Contributor guide
Assessment
This issue has not been assessed yet.