cmake_minimum_required(VERSION 2.8.3) project(LidarMeasure) ## Compile as C++11, supported in ROS Kinetic and newer add_compile_options(-std=c++11) #add_definitions(-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2) FIND_PACKAGE(OpenCV REQUIRED) FIND_PACKAGE(PCL REQUIRED) FIND_PACKAGE(Protobuf REQUIRED) FIND_PACKAGE(Glog REQUIRED) set(CMAKE_MODULE_PATH "/usr/local/share/") set(CMAKE_CXX_FLAGS "-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2") set(CMAKE_BUILD_TYPE "RELEASE") #find_package(Eigen3 REQUIRED) include_directories( laser plc src Locate /usr/local/include/modbus ${PCL_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ) link_directories("/usr/local/lib") aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/Locate LOCATE_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC ) add_executable(LidarMeasure ./main.cpp ${LASER_SRC} ${PLC_SRC} ${TERMINOR_SRC} ${LOCATE_SRC} ${TASK_MANAGER_SRC}) target_link_libraries(LidarMeasure ${OpenCV_LIBS} ${GLOG_LIBRARIES} ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES} ipopt libtensorflow_cc.so tf_3dcnn_api.so pointSIFT_API.so dark.so /usr/local/lib/libglog.a /usr/local/lib/libmodbus.so /usr/local/lib/libgflags.a /usr/local/lib/liblivox_sdk_static.a /usr/local/apr/lib/libapr-1.a nnxx nanomsg)