CMakeLists.txt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(hl_chutian)
  3. ## Compile as C++11, supported in ROS Kinetic and newer
  4. add_compile_options(-std=c++11)
  5. #add_definitions(-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)
  6. FIND_PACKAGE(OpenCV REQUIRED)
  7. FIND_PACKAGE(PCL REQUIRED)
  8. FIND_PACKAGE(Protobuf REQUIRED)
  9. FIND_PACKAGE(Glog REQUIRED)
  10. set(CMAKE_MODULE_PATH "/usr/local/share/")
  11. set(CMAKE_CXX_FLAGS "-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
  12. #set(CMAKE_BUILD_TYPE "RELEASE")
  13. set(CMAKE_BUILD_TYPE Debug)
  14. #find_package(Eigen3 REQUIRED)
  15. MESSAGE(WARN "pcl:: ${PCL_INCLUDE_DIRS} --- ${PCL_LIBRARIES}")
  16. include_directories(
  17. laser
  18. # plc
  19. src
  20. Locate
  21. error_code
  22. tool
  23. # /usr/local/include/modbus
  24. ${PCL_INCLUDE_DIRS}
  25. ${OpenCV_INCLUDE_DIRS}
  26. )
  27. link_directories("/usr/local/lib")
  28. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC )
  29. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC )
  30. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_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. add_executable(hl_chutian ./main.cpp ./error_code/error_code.cpp
  35. # ./src/StdCondition.cpp ./src/CalibParam.pb.cc
  36. ./tool/StdCondition.cpp
  37. # ./globalmsg.pb.cc
  38. # ./MeasureTopicPublisher.cpp
  39. ./laser/laser_task_command
  40. ${LASER_SRC}
  41. # ${PLC_SRC}
  42. ${TERMINOR_SRC}
  43. ${LOCATE_SRC}
  44. ${TASK_MANAGER_SRC}
  45. ${TOOL_SRC}
  46. ./tool/binary_buf.cpp
  47. ./tool/thread_condition.h ./tool/thread_condition.cpp
  48. ./tool/thread_safe_queue.h ./tool/thread_safe_queue.cpp
  49. ./tool/singleton.h ./tool/singleton.cpp
  50. )
  51. target_link_libraries(hl_chutian
  52. ${OpenCV_LIBS}
  53. ${GLOG_LIBRARIES}
  54. ${PCL_LIBRARIES}
  55. ${PROTOBUF_LIBRARIES}
  56. # ipopt
  57. libtensorflow_cc.so
  58. #tf_3dcnn_api.so
  59. pointSIFT_API.so
  60. #dark.so
  61. /usr/local/lib/libglog.a
  62. ##/usr/local/lib/libmodbus.so
  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. )