Fix the use of Eigen3 in cmake

(cherry picked from commit 27c02d1f49468f450c4f91992ddaf5f3e8698b56)
This commit is contained in:
Kentaro Wada 2018-04-25 08:39:51 +00:00
parent 2be69aee71
commit 3e97d7ce9c

View File

@ -41,7 +41,7 @@ find_package(catkin REQUIRED COMPONENTS
include_directories(include include_directories(include
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}
${Eigen3_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS}
) )
@ -83,13 +83,13 @@ catkin_package(
tf tf
DEPENDS DEPENDS
Boost Boost
Eigen3 EIGEN3
PCL PCL
) )
## Declare the pcl_ros_tf library ## Declare the pcl_ros_tf library
add_library(pcl_ros_tf src/transforms.cpp) add_library(pcl_ros_tf src/transforms.cpp)
target_link_libraries(pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_dependencies(pcl_ros_tf ${catkin_EXPORTED_TARGETS}) add_dependencies(pcl_ros_tf ${catkin_EXPORTED_TARGETS})
## Nodelets ## Nodelets
@ -102,7 +102,7 @@ add_library(pcl_ros_io
src/pcl_ros/io/io.cpp src/pcl_ros/io/io.cpp
src/pcl_ros/io/pcd_io.cpp src/pcl_ros/io/pcd_io.cpp
) )
target_link_libraries(pcl_ros_io pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(pcl_ros_io pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
class_loader_hide_library_symbols(pcl_ros_io) class_loader_hide_library_symbols(pcl_ros_io)
## Declare the pcl_ros_features library ## Declare the pcl_ros_features library
@ -121,7 +121,7 @@ add_library(pcl_ros_features
src/pcl_ros/features/principal_curvatures.cpp src/pcl_ros/features/principal_curvatures.cpp
src/pcl_ros/features/vfh.cpp src/pcl_ros/features/vfh.cpp
) )
target_link_libraries (pcl_ros_features ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries (pcl_ros_features ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_dependencies(pcl_ros_features ${PROJECT_NAME}_gencfg) add_dependencies(pcl_ros_features ${PROJECT_NAME}_gencfg)
class_loader_hide_library_symbols(pcl_ros_features) class_loader_hide_library_symbols(pcl_ros_features)
@ -137,7 +137,7 @@ add_library(pcl_ros_filters
src/pcl_ros/filters/voxel_grid.cpp src/pcl_ros/filters/voxel_grid.cpp
src/pcl_ros/filters/crop_box.cpp src/pcl_ros/filters/crop_box.cpp
) )
target_link_libraries(pcl_ros_filters pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(pcl_ros_filters pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_dependencies(pcl_ros_filters ${PROJECT_NAME}_gencfg) add_dependencies(pcl_ros_filters ${PROJECT_NAME}_gencfg)
class_loader_hide_library_symbols(pcl_ros_filters) class_loader_hide_library_symbols(pcl_ros_filters)
@ -149,7 +149,7 @@ add_library (pcl_ros_segmentation
src/pcl_ros/segmentation/segment_differences.cpp src/pcl_ros/segmentation/segment_differences.cpp
src/pcl_ros/segmentation/segmentation.cpp src/pcl_ros/segmentation/segmentation.cpp
) )
target_link_libraries(pcl_ros_segmentation pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(pcl_ros_segmentation pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_dependencies(pcl_ros_segmentation ${PROJECT_NAME}_gencfg) add_dependencies(pcl_ros_segmentation ${PROJECT_NAME}_gencfg)
class_loader_hide_library_symbols(pcl_ros_segmentation) class_loader_hide_library_symbols(pcl_ros_segmentation)
@ -160,26 +160,26 @@ add_library (pcl_ros_surface
src/pcl_ros/surface/convex_hull.cpp src/pcl_ros/surface/convex_hull.cpp
src/pcl_ros/surface/moving_least_squares.cpp src/pcl_ros/surface/moving_least_squares.cpp
) )
target_link_libraries(pcl_ros_surface ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(pcl_ros_surface ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_dependencies(pcl_ros_surface ${PROJECT_NAME}_gencfg) add_dependencies(pcl_ros_surface ${PROJECT_NAME}_gencfg)
class_loader_hide_library_symbols(pcl_ros_surface) class_loader_hide_library_symbols(pcl_ros_surface)
## Tools ## Tools
add_executable(pcd_to_pointcloud tools/pcd_to_pointcloud.cpp) add_executable(pcd_to_pointcloud tools/pcd_to_pointcloud.cpp)
target_link_libraries(pcd_to_pointcloud ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(pcd_to_pointcloud ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_executable(pointcloud_to_pcd tools/pointcloud_to_pcd.cpp) add_executable(pointcloud_to_pcd tools/pointcloud_to_pcd.cpp)
target_link_libraries(pointcloud_to_pcd ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARY_DIRS} ${PCL_LIBRARIES}) target_link_libraries(pointcloud_to_pcd ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_executable(bag_to_pcd tools/bag_to_pcd.cpp) add_executable(bag_to_pcd tools/bag_to_pcd.cpp)
target_link_libraries(bag_to_pcd pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARY_DIRS} ${PCL_LIBRARIES}) target_link_libraries(bag_to_pcd pcl_ros_tf ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_executable(convert_pcd_to_image tools/convert_pcd_to_image.cpp) add_executable(convert_pcd_to_image tools/convert_pcd_to_image.cpp)
target_link_libraries(convert_pcd_to_image ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(convert_pcd_to_image ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_executable(convert_pointcloud_to_image tools/convert_pointcloud_to_image.cpp) add_executable(convert_pointcloud_to_image tools/convert_pointcloud_to_image.cpp)
target_link_libraries(convert_pointcloud_to_image ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES} ${PCL_LIBRARIES}) target_link_libraries(convert_pointcloud_to_image ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${PCL_LIBRARIES})
## Downloads ## Downloads