Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicitly linked libraries ignore INTERFACE_LINK_LIBRARIES #189

Open
rotu opened this issue Aug 21, 2019 · 1 comment
Open

Implicitly linked libraries ignore INTERFACE_LINK_LIBRARIES #189

rotu opened this issue Aug 21, 2019 · 1 comment

Comments

@rotu
Copy link
Contributor

rotu commented Aug 21, 2019

Implicitly linking a library through ament_cmake by importing a package that uses ament_export_libraries will cause that library target's INTERFACE_LINK_LIBRARIES to be ignored.

Say I create a library with

cmake_minimum_required(VERSION 3.5)
project(ProjectA)

add_library(LibA my_library.cpp)
target_link_libraries(LibA PUBLIC systemLib)
# ...
ament_export_libraries(LibA)
ament_package()

Then including this library downstream with:

ament_target_dependencies(LibB LibA)

will cause a link-time error, as systemLib is not recursively linked.
On the other hand, this does cause systemLib to get linked:

find_package(ProjectA REQUIRED)
target_link_libraries(LibB ProjectA::LibA)

It is expected that ament_cmake will respect the standard interface link property.

@rotu
Copy link
Contributor Author

rotu commented Aug 21, 2019

Guillaumebeuzeboc added a commit to Guillaumebeuzeboc/gazebo_snap that referenced this issue Jun 17, 2022
Due to ament/ament_cmake#189
We had to change the way we were referencing the Qt lib from
kde-neon extension. OpenSSL targerts were reported as missing
in the ros_ign_interface
Guillaumebeuzeboc added a commit to Guillaumebeuzeboc/gazebo_snap that referenced this issue Jun 17, 2022
Due to ament/ament_cmake#189
We had to change the way we were referencing the Qt lib from
kde-neon extension. OpenSSL targerts were reported as missing
in the ros_ign_interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant