CMakeLists.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. project(nnxx_tests)
  2. cmake_minimum_required(VERSION 3.5)
  3. set (CMAKE_CXX_STANDARD 11)
  4. #pkg_check_modules(nanomsg REQUIRED nanomsg)
  5. FIND_PACKAGE(nanomsg REQUIRED)
  6. FIND_PACKAGE(Protobuf REQUIRED)
  7. FIND_PACKAGE(Glog REQUIRED)
  8. include_directories(
  9. /usr/local/include
  10. ${PROTOBUF_INCLUDE_DIRS}
  11. ./message
  12. ./communication
  13. ./error_code
  14. ./tool
  15. ./tool/TaskQueue/threadpp
  16. ./system
  17. ./lidar_locate
  18. ./parkspace
  19. ./dispatch
  20. ./exception
  21. )
  22. link_directories("/usr/local/lib")
  23. message(STATUS ${EXECUTABLE_OUTPUT_PATH})
  24. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
  25. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lidar_locate locate_src )
  26. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/robot robot_src )
  27. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC )
  28. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC )
  29. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_SRC )
  30. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/exception exception_src )
  31. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC )
  32. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
  33. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
  34. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool/TaskQueue TASK_QUEUE_SRC )
  35. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
  36. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
  37. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/parkspace PARKSPACE_SRC )
  38. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/dispatch DISPATCH_SRC )
  39. add_executable(process
  40. main.cpp
  41. ./error_code/error_code.cpp
  42. ${locate_src}
  43. ${robot_src}
  44. ${message_src}
  45. ${TOOL_SRC}
  46. ${TASK_QUEUE_SRC}
  47. ${COMMUNICATION_SRC}
  48. ${SYSTEM_SRC}
  49. ${PARKSPACE_SRC}
  50. ${DISPATCH_SRC}
  51. ${exception_src}
  52. )
  53. target_link_libraries(process
  54. nnxx
  55. nanomsg
  56. ${PROTOBUF_LIBRARIES}
  57. /usr/local/lib/libglog.a
  58. /usr/local/lib/libgflags.a
  59. ${GLOG_LIBRARIES}
  60. )
  61. add_executable(terminal
  62. ./test/terminal_client.cpp
  63. ./test/store_terminal.cpp
  64. ./test/pickup_terminal.cpp
  65. ./test/Terminal_communication.cpp
  66. ./error_code/error_code.cpp
  67. ${message_src}
  68. ${TOOL_SRC}
  69. ${TASK_QUEUE_SRC}
  70. ${COMMUNICATION_SRC}
  71. )
  72. target_link_libraries(terminal
  73. nnxx
  74. nanomsg
  75. ${PROTOBUF_LIBRARIES}
  76. /usr/local/lib/libglog.a
  77. /usr/local/lib/libgflags.a
  78. )
  79. #add_executable(test_uuid ./test/uuid_test.cpp ./system/uniq_key.cpp)