CMakeLists.txt 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. project(nnxx_tests)
  2. cmake_minimum_required(VERSION 3.5)
  3. set (CMAKE_CXX_STANDARD 11)
  4. find_package(PkgConfig REQUIRED)
  5. pkg_check_modules(nanomsg REQUIRED nanomsg)
  6. FIND_PACKAGE(Protobuf REQUIRED)
  7. #FIND_PACKAGE(Glog REQUIRED)
  8. FIND_PACKAGE(OpenCV REQUIRED)
  9. FIND_PACKAGE(PCL REQUIRED)
  10. MESSAGE(WARN "pcl:: ${PCL_INCLUDE_DIRS} --- ${PCL_LIBRARIES}")
  11. include_directories(
  12. /usr/local/include
  13. /usr/local/include/snap7
  14. ${PCL_INCLUDE_DIRS}
  15. ${OpenCV_INCLUDE_DIRS}
  16. ${PROTOBUF_INCLUDE_DIRS}
  17. laser
  18. Locate
  19. communication
  20. message
  21. error_code
  22. tool
  23. system
  24. dispatch
  25. )
  26. link_directories("/usr/local/lib")
  27. message(STATUS ${EXECUTABLE_OUTPUT_PATH})
  28. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code error_src )
  29. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
  30. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lidar_locate locate_src )
  31. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/robot robot_src )
  32. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC )
  33. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC )
  34. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_SRC )
  35. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC )
  36. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
  37. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
  38. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool/TaskQueue TASK_QUEUE_SRC )
  39. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
  40. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
  41. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/dispatch DISPATCH_SRC )
  42. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/snap7_communication SNAP7_COMMUNICATION_SRC )
  43. add_executable(terminal
  44. main.cpp
  45. ${error_src}
  46. ${locate_src}
  47. ${robot_src}
  48. ${message_src}
  49. ${LASER_SRC}
  50. ${PLC_SRC}
  51. ${TERMINOR_SRC}
  52. ${LOCATE_SRC}
  53. ${TASK_MANAGER_SRC}
  54. ${TOOL_SRC}
  55. ${TASK_QUEUE_SRC}
  56. ${COMMUNICATION_SRC}
  57. ${SNAP7_COMMUNICATION_SRC}
  58. ${SYSTEM_SRC}
  59. ${DISPATCH_SRC}
  60. )
  61. target_link_libraries(terminal
  62. /usr/local/lib/libglog.a
  63. /usr/local/lib/libgflags.a
  64. # /usr/local/lib/liblivox_sdk_static.a
  65. # /usr/local/apr/lib/libapr-1.a
  66. nnxx
  67. nanomsg
  68. ${PROTOBUF_LIBRARIES}
  69. ${OpenCV_LIBS}
  70. ${GLOG_LIBRARIES}
  71. ${PCL_LIBRARIES}
  72. ${PROTOBUF_LIBRARIES}
  73. # libtensorflow_cc.so
  74. #tf_3dcnn_api.so
  75. # pointSIFT_API.so
  76. snap7
  77. -lpthread
  78. )