Skip to content

Conversation

@pascalau
Copy link

This PR allows kindr to be built completely independently, with catkin or colcon without brittle if/else statements. It exports the header library as the target kindr::kindr in a modern cmake fashion.
Example usage for downstream consumers:

find_package(kindr REQUIRED)
add_library(consumer_lib ...)
target_link_libraries(consumer_lib kindr::kindr)

Tedious working with variables ${kindr_*} and worrying about include directories becomes obsolete.
If downstream targets also export dependencies correctly this simplifies dependency management.

Usage with different build systems:

# pure cmake
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
make
make test
# colcon assuming kindr cloned in src
colcon build --cmake-args -DBUILD_TESTING=ON
colcon test
# analog for catkin tools
catkin build --cmake-args -DBUILD_TESTING=ON
catkin test

Originally filed a year ago against the ASL fork ethz-asl#1. Therefore it might needs some cleanup.

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

Successfully merging this pull request may close these issues.

3 participants