Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CMake targets for eigen (backport #50) #55

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kinematics_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Eigen3
rclcpp
rclcpp_lifecycle
)
Expand All @@ -16,6 +15,7 @@ find_package(ament_cmake REQUIRED)
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()
find_package(Eigen3 REQUIRED NO_MODULE)

# Create interface library for kinematics base class
add_library(kinematics_interface SHARED src/kinematics_interface.cpp)
Expand All @@ -24,6 +24,9 @@ target_include_directories(kinematics_interface PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/kinematics_interface>
)
target_link_libraries(kinematics_interface PUBLIC
Eigen3::Eigen
)
ament_target_dependencies(kinematics_interface PUBLIC
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
Expand Down
5 changes: 4 additions & 1 deletion kinematics_interface_kdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Eigen3
kdl_parser
kinematics_interface
pluginlib
Expand All @@ -18,6 +17,7 @@ find_package(ament_cmake REQUIRED)
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()
find_package(Eigen3 REQUIRED NO_MODULE)

add_library(
kinematics_interface_kdl
Expand All @@ -32,6 +32,9 @@ target_compile_features(kinematics_interface_kdl PUBLIC cxx_std_17)
ament_target_dependencies(kinematics_interface_kdl PUBLIC
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
target_link_libraries(kinematics_interface_kdl PUBLIC
Eigen3::Eigen
)

pluginlib_export_plugin_description_file(kinematics_interface kinematics_interface_kdl.xml)

Expand Down
Loading