Install includes to include/${PROJECT_NAME} and use modern CMake#493
Install includes to include/${PROJECT_NAME} and use modern CMake#493
Conversation
f4bbd3f to
0703d79
Compare
clalancette
left a comment
There was a problem hiding this comment.
I've left a number of questions inline. I basically have two overarching questions:
- If we remove
ament_export_include_directoriesandament_export_libraries, what happens to downstream projects that are depending on the old-style CMake variables? - I'm fine with switching from
ament_target_dependenciestotarget_link_librarieswhere we can, but shouldn't we be explicitly listing all dependencies intarget_link_libraries? There seem to be a number of places where we are now implicitly depending on other targets.
So far, they all still work. The reason is all the downstream projects I've come across are using A common CMake pattern I've seen outside of ROS is to put exported targets into a "..._LIBRARIES" variable taking advantage of downstream targets are likely already doing
I've been intentionally leaving it off when a target is getting dependencies from another target in the same CMake project. My reasoning is it tests that the CMake target we're exporting properly made those targets as |
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
0703d79 to
89fa9bc
Compare
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
|
I rebased this and addressed all feedback. CI
Jobs |
Windows CI failed because we ship a custom Eigen3Config.cmake on Windows that doesn't provide targets instead of using upstreams. This is the same reason I upgraded bullet, but I don't have time to upgrade that one before the freeze. I'll undo all the target stuff for packages using Eigen to get Windows to pass. |
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
|
5cedb80 should resolve the windows issue. CI rerun: |
clalancette
left a comment
There was a problem hiding this comment.
I've left a couple of minor things (and Windows CI needs to be fixed). With those things done, I'll be happy to approve.
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
|
CI LGTM 🎉 @clalancette Mind taking another look? |
Part of ros2/ros2#1150
This installs includes to
include/${PROJECT_NAME}to mitigate include directory search order issues when overriding packages in desktop.Part of ament/ament_cmake#365
This removes
ament_export_librariesandament_export_include_directoriesas they're redundant with the exported CMake targets in packages that I was already changing. I only updated packages that installed headers.Part of ament/ament_cmake#292
This replaces
ament_target_dependencies()calls withtarget_link_libraries()in packages that I was already changing. I only updated packages that installed headers.This also removes the dependency on
eigen3_cmake_modulein packages that I was already changing. It's no longer necessary now that we can use modern CMake targets. I only updated packages that installed headers.Requires ros2/rclcpp#1855 for the
rclcpp_components::componenttarget.