cmake_minimum_required(VERSION 2.8.3) project(shutter_verify) ## Compile as C++11, supported in ROS Kinetic and newer add_compile_options(-std=c++14) FIND_PACKAGE(OpenCV REQUIRED) FIND_PACKAGE(PCL REQUIRED) FIND_PACKAGE(Protobuf REQUIRED) FIND_PACKAGE(Glog REQUIRED) FIND_PACKAGE(Ceres 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( tool error_code verify laser plc /usr/include /usr/local/include /usr/local/include/modbus /usr/local/include/snap7 ${GLOG_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS} /usr/local/include/csm ) link_directories("/usr/local/lib") aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code ERROR_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/laser LASER ) aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/plc PLC_SRC ) #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC ) #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/verify VERIFY ) #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/verify/match3d MATCH3D ) add_executable(shutter_verify ./main.cpp setting.pb.cc safety_excutor.cpp ${ERROR_SRC} ${LASER} ${PLC_SRC} ${TOOL_SRC} ) target_link_libraries(shutter_verify ${OpenCV_LIBS} ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES} ${CERES_LIBRARIES} /usr/local/lib/libglog.a /usr/local/lib/libgflags.a /usr/local/lib/liblivox_sdk_static.a snap7 )