ethz-asl / rotors_simulator

RotorS is a UAV gazebo simulator
1.24k stars 759 forks source link

Fix cmake target libraries and linking so plugins work #667

Open jlack1987 opened 3 years ago

jlack1987 commented 3 years ago

The mav_msgs library created in rotors_gazebo_plugins isn't linked to a few of the libraries that use it and also it is not installed. This MR fixes that stuff. I also changed the name of the library to mav_proto_msgs bc mav_msgs is the name of a package and it is a bit confusing(at least it was to me reading through it) having a library given the same name as a package being depended upon.

This fixes this issue

ethzasl-jenkins commented 3 years ago

Can one of the admins verify this patch?

Jaeyoung-Lim commented 3 years ago

@ethzasl-jenkins Test this please

jlack1987 commented 3 years ago

Although renaming the package is problematic, since this package is being deployed with the ROS build farm. (e.g. ros-melodic-mav-msgs)

Just to clarify, the changes here do not rename a package. The CMakeLists.txt was already such that there was a cmake library with the same name as a package being depended upon. This was confusing to me and i'm surprised it didn't cause any errors/warnings. The change here renames the library which is then linked to other targets.

jlack1987 commented 3 years ago

I saw another MR was merged so I pulled master. I also changed how I was fixing the linking issue by just appending the missing proto libraries to the target_linking_LIBRARIES list which made fixing these issues much cleaner. Let me know if there's anything else I can do to get this merged. Thanks!