123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- cmake_minimum_required(VERSION 2.8.3)
- project(LidarMeasure)
- ## Compile as C++14, supported in ROS Kinetic and newer
- add_compile_options(-std=c++14)
- #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)
- 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 "-std=c++14 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
- set(CMAKE_BUILD_TYPE "RELEASE")
- #find_package(Eigen3 REQUIRED)
- include_directories(
- tool
- laser
- plc
- src
- Locate
- /usr/local/include
- /usr/include/modbus
- /usr/local/include/snap7
- ${PCL_INCLUDE_DIRS}
- ${OpenCV_INCLUDE_DIRS}
- ${CERES_INCLUDE_DIRS}
- )
- link_directories("/usr/local/lib")
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
- 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_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}/verify VERIFY_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system_manager SYS_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/wj_lidar WJLIDAR_SRC )
- add_executable(test_laser ./test/test_laser.cpp ${LASER_SRC} ${ERROR_SRC}
- ${TOOL_SRC} ${TASK_MANAGER_SRC})
- target_link_libraries(test_laser ${OpenCV_LIBS}
- ${GLOG_LIBRARIES} ${PCL_LIBRARIES} ${PROTOBUF_LIBRARIES}
- /usr/local/lib/libglog.a snap7 nnxx nanomsg
- /usr/local/lib/libgflags.a /usr/local/lib/liblivox_sdk_static.a /usr/lib/x86_64-linux-gnu/libapr-1.a)
|