CMakeLists.txt 996 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(rplidar_ros)
  3. set(RPLIDAR_SDK_PATH "./sdk/")
  4. FILE(GLOB RPLIDAR_SDK_SRC
  5. "${RPLIDAR_SDK_PATH}/src/arch/linux/*.cpp"
  6. "${RPLIDAR_SDK_PATH}/src/hal/*.cpp"
  7. "${RPLIDAR_SDK_PATH}/src/*.cpp"
  8. )
  9. find_package(catkin REQUIRED COMPONENTS
  10. roscpp
  11. rosconsole
  12. sensor_msgs
  13. )
  14. include_directories(
  15. ${RPLIDAR_SDK_PATH}/include
  16. ${RPLIDAR_SDK_PATH}/src
  17. ${catkin_INCLUDE_DIRS}
  18. )
  19. catkin_package()
  20. add_executable(rplidarNode src/node.cpp ${RPLIDAR_SDK_SRC})
  21. target_link_libraries(rplidarNode ${catkin_LIBRARIES})
  22. add_executable(rplidarNodeClient src/client.cpp)
  23. target_link_libraries(rplidarNodeClient ${catkin_LIBRARIES})
  24. install(TARGETS rplidarNode rplidarNodeClient
  25. ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  26. LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  27. RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  28. )
  29. install(DIRECTORY launch rviz sdk
  30. DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
  31. USE_SOURCE_PERMISSIONS
  32. )