123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- cmake_minimum_required(VERSION 2.8.3)
- project(shutter_verify)
- # set (CMAKE_C_COMPILER "/usr/bin/aarch64-linux-gnu-gcc")
- # set (CMAKE_CXX_COMPILER "/usr/bin/aarch64-linux-gnu-g++")
- ## Compile as C++11, supported in ROS Kinetic and newer
- add_compile_options(-std=c++14)
- add_compile_definitions(__VIEW__PCL=0)
- find_package(Eigen3 REQUIRED)
- FIND_PACKAGE(PCL REQUIRED)
- find_package(Boost COMPONENTS system thread timer chrono REQUIRED)
- FIND_PACKAGE(Protobuf REQUIRED)
- #FIND_PACKAGE(Glog REQUIRED)
- set(CMAKE_MODULE_PATH "/usr/local/share/")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-as-needed")
- #set(CMAKE_CXX_FLAGS "-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
- set(CMAKE_BUILD_TYPE "RELEASE")
- #find_package(Eigen3 REQUIRED)
- include_directories(
- ${Boost_INCLUDE_DIR}
- ${PCL_INCLUDE_DIRS}
- ${Eigen3_INCLUDE_DIRS}
- ${GLOG_INCLUDE_DIRS}
- /usr/local/include/snap7
- )
- link_directories("/usr/local/lib")
- link_directories(${Boost_LIBRARY_DIR})
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lidar LIDAR_SRC)
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/detect DETECT_SRC)
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC)
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code ERROR_SRC)
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC)
- add_executable(clamp_safety main.cpp clamp_parameter.pb.cc
- ${LIDAR_SRC} ${DETECT_SRC} ${PLC_SRC} ${ERROR_SRC} ${TOOL_SRC})
- target_link_libraries(clamp_safety ${OpenCV_LIBS}
- ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES}
- ${Boost_LIBRARIES}
- # /usr/lib/aarch64-linux-gnu/libglog.a
- # /usr/lib/aarch64-linux-gnu/libgflags.a
- /usr/local/lib/libglog.a
- /usr/local/lib/libgflags.a
- snap7
- )
- # add_executable(clamp_safety_monitor monitor.cpp clamp_parameter.pb.cc test.cpp
- # ${LIDAR_SRC} ${DETECT_SRC} ${PLC_SRC} ${ERROR_SRC} ${TOOL_SRC})
- # target_link_libraries(clamp_safety_monitor ${OpenCV_LIBS}
- # ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES}
- # ${Boost_LIBRARIES}
- # # /usr/lib/aarch64-linux-gnu/libglog.a
- # # /usr/lib/aarch64-linux-gnu/libgflags.a
- # /usr/local/lib/libglog.a
- # /usr/local/lib/libgflags.a
- # snap7
- # )
- #/usr/local/lib/libgflags.a
|