CMakeLists.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. pkg_check_modules(nanomsg REQUIRED nanomsg)
  2. include_directories(
  3. )
  4. link_directories("/usr/local/lib")
  5. message(STATUS ${EXECUTABLE_OUTPUT_PATH})
  6. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code ERROR_SRC )
  7. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
  8. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/wanji_lidar WANJI_LIDAR_SRC )
  9. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
  10. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
  11. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
  12. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
  13. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/verify VERIFY_SRC )
  14. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar/match3d/common VELODYNE_LIDAR_COMMON)
  15. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar/match3d/ VELODYNE_LIDAR_MATCH)
  16. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar/velodyne_driver VELODYNE_LIDAR_DRIVER)
  17. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar VELODYNE_LIDAR)
  18. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/rabbitmq RABBIT_MQ)
  19. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/rslidar RSLIDAR)
  20. add_executable(measure_wj
  21. ${CMAKE_CURRENT_LIST_DIR}/measure_main.cpp
  22. ${ERROR_SRC}
  23. ${message_src}
  24. ${WANJI_LIDAR_SRC}
  25. ${TASK_MANAGER_SRC}
  26. ${TOOL_SRC}
  27. ${COMMUNICATION_SRC}
  28. ${SYSTEM_SRC}
  29. ${VERIFY_SRC}
  30. ${VELODYNE_LIDAR_COMMON}
  31. ${VELODYNE_LIDAR_MATCH}
  32. ${VELODYNE_LIDAR_DRIVER}
  33. ${VELODYNE_LIDAR}
  34. ${RABBIT_MQ}
  35. ${RSLIDAR}
  36. )
  37. target_link_libraries(measure_wj
  38. zx
  39. /usr/local/lib/librabbitmq.a
  40. nnxx
  41. nanomsg
  42. ${CERES_LIBRARIES}
  43. ${YAML_CPP_LIBRARIES}
  44. -lpthread
  45. )
  46. install(TARGETS measure_wj
  47. LIBRARY DESTINATION lib # 动态库安装路径
  48. ARCHIVE DESTINATION lib # 静态库安装路径
  49. RUNTIME DESTINATION bin # 可执行文件安装路径
  50. PUBLIC_HEADER DESTINATION include # 头文件安装路径
  51. )
  52. #install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/etc
  53. # DESTINATION ${CMAKE_INSTALL_PREFIX}
  54. # )