Skip to content

Commit

Permalink
Use Eigen CMake target (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Mar 4, 2024
1 parent c78c686 commit 02a9e3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ set(CONTROL_FILTERS_INCLUDE_DEPENDS
generate_parameter_library
pluginlib
geometry_msgs
Eigen3
)

foreach(Dependency IN ITEMS ${CONTROL_FILTERS_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()
find_package(Eigen3 REQUIRED NO_MODULE)

generate_parameter_library(
low_pass_filter_parameters
Expand All @@ -72,7 +71,10 @@ target_include_directories(low_pass_filter PUBLIC
$<BUILD_INTERFACE:${EIGEN3_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include/control_toolbox>
)
target_link_libraries(low_pass_filter PUBLIC low_pass_filter_parameters)
target_link_libraries(low_pass_filter PUBLIC
low_pass_filter_parameters
Eigen3::Eigen
)
ament_target_dependencies(low_pass_filter PUBLIC ${CONTROL_FILTERS_INCLUDE_DEPENDS})

# Install pluginlib xml
Expand Down
3 changes: 2 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
<buildtool_depend>ament_cmake</buildtool_depend>

<depend>control_msgs</depend>
<depend>eigen</depend>
<depend>filters</depend>
<depend>generate_parameter_library</depend>
<depend>geometry_msgs</depend>
<depend>pluginlib</depend>
<depend>generate_parameter_library</depend>
<depend>rclcpp</depend>
<depend>rcutils</depend>
<depend>realtime_tools</depend>
Expand Down

0 comments on commit 02a9e3a

Please sign in to comment.