123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- project(measure_wj_proj)
- cmake_minimum_required(VERSION 3.5)
- set (CMAKE_CXX_STANDARD 11)
- set(CMAKE_BUILD_TYPE "Release")
- # set(PCL_DIR "/home/youchen/pcl-1.8/share/pcl-1.8")
- #nanomsg
- find_package(PkgConfig REQUIRED)
- pkg_check_modules(nanomsg REQUIRED nanomsg)
- #yaml
- pkg_check_modules(YAML_CPP REQUIRED yaml-cpp)
- find_path(YAML_CPP_INCLUDE_DIR
- NAMES yaml_cpp.h
- PATHS ${YAML_CPP_INCLUDE_DIRS})
- find_library(YAML_CPP_LIBRARY
- NAMES YAML_CPP
- PATHS ${YAML_CPP_LIBRARY_DIRS})
- link_directories(${YAML_CPP_LIBRARY_DIRS})
- if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5")
- add_definitions(-DHAVE_NEW_YAMLCPP)
- endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5")
- # MESSAGE(WARNING ${YAML_CPP_VERSION} ${YAML_CPP_INCLUDE_DIRS} ${YAML_CPP_LIBRARY_DIRS})
- #other libs
- FIND_PACKAGE(Protobuf REQUIRED)
- FIND_PACKAGE(Glog REQUIRED)
- FIND_PACKAGE(OpenCV REQUIRED)
- FIND_PACKAGE(PCL REQUIRED)
- FIND_PACKAGE(Ceres REQUIRED)
- MESSAGE(WARN "pcl:: ${PCL_INCLUDE_DIRS} --- ${PCL_LIBRARIES}")
- include_directories(
- /usr/local/include
- ${PCL_INCLUDE_DIRS}
- ${OpenCV_INCLUDE_DIRS}
- ${PROTOBUF_INCLUDE_DIRS}
- ${CERES_INCLUDE_DIRS}
- communication
- message
- error_code
- tool
- system
- )
- link_directories("/usr/local/lib")
- message(STATUS ${EXECUTABLE_OUTPUT_PATH})
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/error_code ERROR_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message message_src )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/wanji_lidar WANJI_LIDAR_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/verify VERIFY_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar/match3d/common VELODYNE_LIDAR_COMMON)
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar/match3d/ VELODYNE_LIDAR_MATCH)
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar/velodyne_driver VELODYNE_LIDAR_DRIVER)
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/velodyne_lidar VELODYNE_LIDAR)
- add_executable(measure_wj
- main.cpp
- ${ERROR_SRC}
- ${message_src}
- ${WANJI_LIDAR_SRC}
- ${TASK_MANAGER_SRC}
- ${TOOL_SRC}
- ${COMMUNICATION_SRC}
- ${SYSTEM_SRC}
- ${VERIFY_SRC}
- ${VELODYNE_LIDAR_COMMON}
- ${VELODYNE_LIDAR_MATCH}
- ${VELODYNE_LIDAR_DRIVER}
- ${VELODYNE_LIDAR}
- )
- target_link_libraries(measure_wj
- /usr/local/lib/libglog.a
- /usr/local/lib/libgflags.a
- nnxx
- nanomsg
- ${PROTOBUF_LIBRARIES}
- ${OpenCV_LIBS}
- ${GLOG_LIBRARIES}
- ${PCL_LIBRARIES}
- ${CERES_LIBRARIES}
- ${YAML_CPP_LIBRARIES}
- -lpthread
- )
- # vlp16 driver test
- add_executable(vlp16 tests/vlp16_driver_test.cpp
- ${ERROR_SRC}
- ${message_src}
- ${WANJI_LIDAR_SRC}
- ${TASK_MANAGER_SRC}
- ${TOOL_SRC}
- ${COMMUNICATION_SRC}
- ${SYSTEM_SRC}
- ${VERIFY_SRC}
- ${VELODYNE_LIDAR_COMMON}
- ${VELODYNE_LIDAR_MATCH}
- ${VELODYNE_LIDAR_DRIVER}
- ${VELODYNE_LIDAR}
- )
- target_link_libraries(vlp16
- /usr/local/lib/libglog.a
- /usr/local/lib/libgflags.a
- nnxx
- nanomsg
- ${PROTOBUF_LIBRARIES}
- ${OpenCV_LIBS}
- ${GLOG_LIBRARIES}
- ${PCL_LIBRARIES}
- ${CERES_LIBRARIES}
- ${YAML_CPP_LIBRARIES}
- )
- add_executable(lidar_calib_tool ./tests/lidar_calib_tools.cpp ./tool/point_tool.cpp)
- target_link_libraries(lidar_calib_tool
- ${PCL_LIBRARIES}
- ${OpenCV_LIBS}
- )
|