CMakeLists.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. )
  25. link_directories("/usr/local/lib")
  26. message(STATUS ${EXECUTABLE_OUTPUT_PATH})
  27. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code error_src )
  28. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
  29. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lidar_locate locate_src )
  30. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/robot robot_src )
  31. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC )
  32. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC )
  33. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_SRC )
  34. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC )
  35. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
  36. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
  37. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
  38. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
  39. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/dispatch DISPATCH_SRC )
  40. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/snap7_communication SNAP7_COMMUNICATION_SRC )
  41. add_executable(terminal
  42. main.cpp
  43. ${error_src}
  44. ${locate_src}
  45. ${robot_src}
  46. ${message_src}
  47. ${LASER_SRC}
  48. ${PLC_SRC}
  49. ${TERMINOR_SRC}
  50. ${LOCATE_SRC}
  51. ${TASK_MANAGER_SRC}
  52. ${TOOL_SRC}
  53. ${COMMUNICATION_SRC}
  54. ${SNAP7_COMMUNICATION_SRC}
  55. ${SYSTEM_SRC}
  56. ${DISPATCH_SRC}
  57. )
  58. target_link_libraries(terminal
  59. /usr/local/lib/libglog.a
  60. /usr/local/lib/libgflags.a
  61. # /usr/local/lib/liblivox_sdk_static.a
  62. # /usr/local/apr/lib/libapr-1.a
  63. nnxx
  64. nanomsg
  65. ${PROTOBUF_LIBRARIES}
  66. ${OpenCV_LIBS}
  67. ${GLOG_LIBRARIES}
  68. ${PCL_LIBRARIES}
  69. ${PROTOBUF_LIBRARIES}
  70. libtensorflow_cc.so
  71. #tf_3dcnn_api.so
  72. pointSIFT_API.so
  73. snap7
  74. -lpthread
  75. )