Guest User

CMakeLists.txt

a guest
Jul 24th, 2014
242
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(toro)
  3.  
  4. find_package(catkin REQUIRED COMPONENTS
  5. roscpp
  6. roscpp_serialization
  7. rospy
  8. serial
  9. serial_utils
  10. std_msgs
  11. nav_msgs
  12. tf
  13. )
  14.  
  15. find_package(Boost REQUIRED COMPONENTS system thread)
  16.  
  17. add_message_files(
  18. FILES
  19. Encoders.msg
  20. StampedEncoders.msg
  21. )
  22.  
  23. generate_messages(DEPENDENCIES geometry_msgs nav_msgs)
  24.  
  25. catkin_package(
  26. DEPENDS system_lib
  27. INCLUDE_DIRS include
  28. LIBRARIES ax2550
  29. CATKIN_DEPENDS geometry_msgs nav_msgs roscpp serial serial_utils tf
  30. )
  31.  
  32.  
  33. include_directories(include $catkin_INCLUDE_DIRS)
  34.  
  35. #example publisher
  36. add_executable(example_publisher src/example_publisher.cpp)
  37. target_link_libraries(example_publisher ${catkin_LIBRARIES})
  38.  
  39. #example subscriber
  40. add_executable(example_subscriber src/example_subscriber.cpp)
  41. target_link_libraries(example_subscriber ${catkin_LIBRARIES})
  42.  
  43. #LMS1xx node
  44. add_executable(LMS1xx_node src/LMS1xx_node.cpp src/LMS1xx.cpp)
  45. target_link_libraries(LMS1xx_node ${catkin_LIBRARIES})
  46.  
  47. #sweepLaserInterface node #this is thr one I'm currently working on/encountering errors in
  48. add_executable(sweepLaserInterface_node src/sweepLaserInterface.cpp)
  49. target_link_libraries(sweepLaserInterface_node ${catkin_LIBRARIES})
  50.  
  51. install(TARGETS LMS1xx_node DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
  52. install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
  53.  
  54. ## ax2550 ROS agnostic library
  55. add_library(ax2550 src/ax2550.cpp)
  56. target_link_libraries(ax2550 ${serial_LIBRARIES} ${serial_utils_LIBRARIES} ${Boost_LIBRARIES})
  57.  
  58. ## ax2550 node
  59. add_executable(ax2550_node src/ax2550_node.cpp)
  60. target_link_libraries(ax2550_node ax2550 ${catkin_LIBRARIES})
  61. add_dependencies(ax2550_node ax2550_generate_messages_cpp ${catkin_EXPORTED_LIBRARIES})
  62.  
  63. install(TARGETS ax2550 ax2550_node
  64. ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  65. LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  66. RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
  67.  
  68. install(DIRECTORY include/${PROJECT_NAME}/
  69. DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  70. FILES_MATCHING PATTERN "*.h")
RAW Paste Data