Skip to content

Commit

Permalink
More context about why this package should be used
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
  • Loading branch information
sloretz committed Aug 7, 2019
1 parent c414e74 commit e78118d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# eigen3_cmake_module

On Ubuntu Bionic the `Eigen3` CMake package offers exported targets and non-standard CMake variables.
This is a problem for packages using [ament_cmake](https://github.com/ament/ament_cmake).
Targets using `ament_target_dependencies(my_target Eigen3)` will fail to find `Eigen3` headers at compile time.
Downstream packages will also fail to find `Eigen3` headers at compile time, even if your package uses `ament_export_dependencies(Eigen3)`.

This package adds a [CMake find module](https://cmake.org/cmake/help/v3.14/manual/cmake-developer.7.html#find-modulesjj) for [Eigen3](https://eigen.tuxfamily.org/dox/) that sets [standard CMake variables](https://cmake.org/cmake/help/v3.5/manual/cmake-developer.7.html#standard-variable-names).
This enables `ament_export_dependencies(Eigen3)` and `ament_target_dependencies(my_target Eigen3)`.
ROS 2 packages using `Eigen3` should use this package to avoid these problems.

## Using this package

This section assumes you're using [ament_cmake](https://github.com/ament/ament_cmake).

### Edit your CMakeLists.txt
In your `CMakeLists.txt`, call `find_package()` on this package using `REQUIRED`.
Afterwards find `Eigen3` with or without `REQUIRED` as appropriate for your package.
Expand Down

0 comments on commit e78118d

Please sign in to comment.