CMakeLists.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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/include
  13. /usr/local/include
  14. /usr/local/include/cppconn/
  15. # /usr/local/mysql/connector-c++-8.0.30/include
  16. /usr/local/include/snap7
  17. # ${PCL_INCLUDE_DIRS}
  18. # ${OpenCV_INCLUDE_DIRS}
  19. ${PROTOBUF_INCLUDE_DIRS}
  20. laser
  21. Locate
  22. communication
  23. message
  24. error_code
  25. tool
  26. system
  27. dispatch
  28. rabbimq
  29. # parkspace_allocation
  30. )
  31. link_directories("/usr/local/lib" "/usr/local/mysql/connector-c++-8.0.30/lib64/debug")
  32. message(STATUS ${EXECUTABLE_OUTPUT_PATH})
  33. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code error_src )
  34. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
  35. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lidar_locate locate_src )
  36. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/robot robot_src )
  37. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC )
  38. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC )
  39. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_SRC )
  40. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC )
  41. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
  42. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
  43. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool/TaskQueue TASK_QUEUE_SRC )
  44. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
  45. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
  46. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/dispatch DISPATCH_SRC )
  47. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/snap7_communication SNAP7_COMMUNICATION_SRC )
  48. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/rabbitmq RABBITMQ_SRC )
  49. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/boost_asio BOOST_ASIO_SRC )
  50. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/network_communication NETWORK_COMMUNICATION_SRC )
  51. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/parkspace_allocation PARKSPACE_ALLOCATION_SRC )
  52. add_executable(terminal
  53. main.cpp
  54. ${error_src}
  55. ${locate_src}
  56. ${robot_src}
  57. ${message_src}
  58. ${LASER_SRC}
  59. ${PLC_SRC}
  60. ${TERMINOR_SRC}
  61. ${LOCATE_SRC}
  62. ${TASK_MANAGER_SRC}
  63. ${TOOL_SRC}
  64. ${TASK_QUEUE_SRC}
  65. ${COMMUNICATION_SRC}
  66. ${SNAP7_COMMUNICATION_SRC}
  67. ${SYSTEM_SRC}
  68. ${DISPATCH_SRC}
  69. ${RABBITMQ_SRC}
  70. # ${PARKSPACE_ALLOCATION_SRC}
  71. ${BOOST_ASIO_SRC}
  72. ${NETWORK_COMMUNICATION_SRC}
  73. )
  74. target_link_libraries(terminal
  75. /usr/local/lib/libglog.a
  76. /usr/local/lib/libgflags.a
  77. # /usr/local/lib/liblivox_sdk_static.a
  78. # /usr/local/apr/lib/libapr-1.a
  79. nnxx
  80. nanomsg
  81. rabbitmq
  82. libmysqlcppconn.so
  83. # MySQL::conncpp
  84. # conncpp
  85. # connector
  86. # mysqlcppconn8
  87. ${PROTOBUF_LIBRARIES}
  88. # ${OpenCV_LIBS}
  89. ${GLOG_LIBRARIES}
  90. # ${PCL_LIBRARIES}
  91. ${PROTOBUF_LIBRARIES}
  92. # libtensorflow_cc.so
  93. #tf_3dcnn_api.so
  94. # pointSIFT_API.so
  95. snap7
  96. -lpthread
  97. )