CMakeLists.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(shutter_verify)
  3. # set (CMAKE_C_COMPILER "/usr/bin/aarch64-linux-gnu-gcc")
  4. # set (CMAKE_CXX_COMPILER "/usr/bin/aarch64-linux-gnu-g++")
  5. ## Compile as C++11, supported in ROS Kinetic and newer
  6. add_compile_options(-std=c++14)
  7. add_compile_definitions(__VIEW__PCL=0)
  8. find_package(Eigen3 REQUIRED)
  9. FIND_PACKAGE(PCL REQUIRED)
  10. find_package(Boost COMPONENTS system thread timer chrono REQUIRED)
  11. FIND_PACKAGE(Protobuf REQUIRED)
  12. #FIND_PACKAGE(Glog REQUIRED)
  13. set(CMAKE_MODULE_PATH "/usr/local/share/")
  14. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-as-needed")
  15. #set(CMAKE_CXX_FLAGS "-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
  16. set(CMAKE_BUILD_TYPE "RELEASE")
  17. #find_package(Eigen3 REQUIRED)
  18. include_directories(
  19. ${Boost_INCLUDE_DIR}
  20. ${PCL_INCLUDE_DIRS}
  21. ${Eigen3_INCLUDE_DIRS}
  22. ${GLOG_INCLUDE_DIRS}
  23. /usr/local/include/snap7
  24. )
  25. link_directories("/usr/local/lib")
  26. link_directories(${Boost_LIBRARY_DIR})
  27. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lidar LIDAR_SRC)
  28. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/detect DETECT_SRC)
  29. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC)
  30. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code ERROR_SRC)
  31. aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC)
  32. add_executable(clamp_safety main.cpp clamp_parameter.pb.cc
  33. ${LIDAR_SRC} ${DETECT_SRC} ${PLC_SRC} ${ERROR_SRC} ${TOOL_SRC})
  34. target_link_libraries(clamp_safety ${OpenCV_LIBS}
  35. ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES}
  36. ${Boost_LIBRARIES}
  37. # /usr/lib/aarch64-linux-gnu/libglog.a
  38. # /usr/lib/aarch64-linux-gnu/libgflags.a
  39. /usr/local/lib/libglog.a
  40. /usr/local/lib/libgflags.a
  41. snap7
  42. )
  43. # add_executable(clamp_safety_monitor monitor.cpp clamp_parameter.pb.cc test.cpp
  44. # ${LIDAR_SRC} ${DETECT_SRC} ${PLC_SRC} ${ERROR_SRC} ${TOOL_SRC})
  45. # target_link_libraries(clamp_safety_monitor ${OpenCV_LIBS}
  46. # ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES}
  47. # ${Boost_LIBRARIES}
  48. # # /usr/lib/aarch64-linux-gnu/libglog.a
  49. # # /usr/lib/aarch64-linux-gnu/libgflags.a
  50. # /usr/local/lib/libglog.a
  51. # /usr/local/lib/libgflags.a
  52. # snap7
  53. # )
  54. #/usr/local/lib/libgflags.a