Advertisement
Guest User

Untitled

a guest
Apr 18th, 2012
183
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required (VERSION 2.4.6)
  2.  
  3. include ($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
  4. rosbuild_init ()
  5. rosbuild_add_boost_directories ()
  6. #add_definitions (-Wall -O3 -funroll-loops)
  7. add_definitions (-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET)
  8. rosbuild_check_for_sse ()
  9.  
  10. set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
  11. include_directories (${CMAKE_CURRENT_BINARY_DIR})
  12. include_directories (src)
  13.  
  14. # Uses Eigen
  15. list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
  16. find_package(Eigen REQUIRED)
  17. include_directories(${Eigen_INCLUDE_DIRS})
  18. include_directories(${EIGEN_INCLUDE_DIRS})
  19.  
  20. # Uses PCL
  21. find_package(PCL REQUIRED)
  22. include_directories(${PCL_INCLUDE_DIRS})
  23. link_directories(${PCL_LIBRARY_DIRS})
  24.  
  25. # Enable dynamic_reconfigure
  26. rosbuild_find_ros_package (dynamic_reconfigure)
  27. include (${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake)
  28. gencfg ()
  29.  
  30. # ---[ Point Cloud Library - Transforms
  31. rosbuild_add_library (pcl_ros_tf src/pcl_ros/transforms.cpp)
  32. rosbuild_add_compile_flags (pcl_ros_tf ${SSE_FLAGS})
  33. target_link_libraries(pcl_ros_tf ${PCL_LIBRARIES})
  34.  
  35. # ---[ Point Cloud Library - IO
  36. rosbuild_add_library (pcl_ros_io
  37. src/pcl_ros/io/io.cpp
  38. src/pcl_ros/io/concatenate_fields.cpp
  39. src/pcl_ros/io/concatenate_data.cpp
  40. src/pcl_ros/io/pcd_io.cpp
  41. src/pcl_ros/io/bag_io.cpp
  42. )
  43. rosbuild_add_compile_flags (pcl_ros_io ${SSE_FLAGS})
  44. rosbuild_link_boost (pcl_ros_io system)
  45. target_link_libraries (pcl_ros_io pcl_ros_tf ${PCL_LIBRARIES})
  46. rosbuild_link_boost (pcl_ros_io signals)
  47.  
  48. ## ---[ PCL ROS - Features
  49. rosbuild_add_library (pcl_ros_features
  50. src/pcl_ros/features/feature.cpp
  51. # Compilation is much faster if we include all the following CPP files in feature.cpp
  52. src/pcl_ros/features/boundary.cpp
  53. src/pcl_ros/features/fpfh.cpp
  54. src/pcl_ros/features/fpfh_omp.cpp
  55. src/pcl_ros/features/moment_invariants.cpp
  56. src/pcl_ros/features/normal_3d.cpp
  57. src/pcl_ros/features/normal_3d_omp.cpp
  58. src/pcl_ros/features/pfh.cpp
  59. src/pcl_ros/features/principal_curvatures.cpp
  60. src/pcl_ros/features/vfh.cpp
  61. )
  62. rosbuild_add_compile_flags (pcl_ros_features ${SSE_FLAGS})
  63. rosbuild_add_openmp_flags (pcl_ros_features)
  64. # ---[ Point Cloud Library - Surface
  65. rosbuild_add_library (pcl_ros_surface
  66. src/pcl_ros/surface/surface.cpp
  67. # Compilation is much faster if we include all the following CPP files in surface.cpp
  68. src/pcl_ros/surface/convex_hull.cpp
  69. src/pcl_ros/surface/moving_least_squares.cpp
  70. )
  71. rosbuild_add_compile_flags (pcl_ros_surface ${SSE_FLAGS})
  72. # ---[ PCL ROS - Filters
  73. rosbuild_add_library (pcl_ros_filters
  74. src/pcl_ros/filters/filter.cpp
  75. src/pcl_ros/filters/passthrough.cpp
  76. src/pcl_ros/filters/project_inliers.cpp
  77. src/pcl_ros/filters/extract_indices.cpp
  78. src/pcl_ros/filters/radius_outlier_removal.cpp
  79. src/pcl_ros/filters/statistical_outlier_removal.cpp
  80. src/pcl_ros/filters/voxel_grid.cpp
  81. )
  82. rosbuild_add_compile_flags (pcl_ros_filters ${SSE_FLAGS})
  83. target_link_libraries (pcl_ros_filters pcl_ros_tf ${PCL_LIBRARIES})
  84. rosbuild_link_boost (pcl_ros_filters signals)
  85.  
  86. ## ---[ Point Cloud Library - Segmentation
  87. rosbuild_add_library (pcl_ros_segmentation
  88. src/pcl_ros/segmentation/segmentation.cpp
  89. src/pcl_ros/segmentation/segment_differences.cpp
  90. src/pcl_ros/segmentation/extract_clusters.cpp
  91. src/pcl_ros/segmentation/extract_polygonal_prism_data.cpp
  92. src/pcl_ros/segmentation/sac_segmentation.cpp
  93. )
  94. rosbuild_add_compile_flags (pcl_ros_segmentation ${SSE_FLAGS})
  95. target_link_libraries (pcl_ros_segmentation pcl_segmentation pcl_ros_tf)
  96. rosbuild_link_boost (pcl_ros_segmentation system filesystem)
  97. add_subdirectory (src/tools)
  98. add_subdirectory (test)
Advertisement
RAW Paste Data Copied
Advertisement