CMakeLists.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(shutter_verify)
  3. ## Compile as C++11, supported in ROS Kinetic and newer
  4. add_compile_options(-std=c++14)
  5. FIND_PACKAGE(OpenCV REQUIRED)
  6. FIND_PACKAGE(PCL REQUIRED)
  7. FIND_PACKAGE(Protobuf REQUIRED)
  8. FIND_PACKAGE(Glog REQUIRED)
  9. FIND_PACKAGE(Ceres REQUIRED)
  10. set(CMAKE_MODULE_PATH "/usr/local/share/")
  11. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-as-needed")
  12. set(CMAKE_CXX_FLAGS "-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
  13. set(CMAKE_BUILD_TYPE "RELEASE")
  14. #find_package(Eigen3 REQUIRED)
  15. include_directories(
  16. tool
  17. error_code
  18. verify
  19. laser
  20. plc
  21. /usr/include
  22. /usr/local/include
  23. /usr/local/include/modbus
  24. /usr/local/include/snap7
  25. ${GLOG_INCLUDE_DIRS}
  26. ${PCL_INCLUDE_DIRS}
  27. ${OpenCV_INCLUDE_DIRS}
  28. ${CERES_INCLUDE_DIRS}
  29. /usr/local/include/csm
  30. )
  31. link_directories("/usr/local/lib")
  32. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code ERROR_SRC )
  33. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
  34. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER )
  35. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC )
  36. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
  37. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/verify VERIFY )
  38. #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/verify/match3d MATCH3D )
  39. add_executable(shutter_verify ./main.cpp setting.pb.cc
  40. safety_excutor.cpp
  41. ${ERROR_SRC} ${LASER} ${PLC_SRC}
  42. ${TOOL_SRC} )
  43. target_link_libraries(shutter_verify ${OpenCV_LIBS}
  44. ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES} ${CERES_LIBRARIES}
  45. /usr/local/lib/libglog.a /usr/local/lib/libgflags.a
  46. /usr/local/lib/liblivox_sdk_static.a
  47. snap7
  48. )