CMakeLists.txt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(lili_om_rot)
  3. ## Compile as C++14, supported in ROS Kinetic and newer
  4. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3")
  5. ## Find catkin macros and libraries
  6. find_package(catkin REQUIRED COMPONENTS
  7. roscpp
  8. std_msgs
  9. nav_msgs
  10. sensor_msgs
  11. geometry_msgs
  12. message_generation
  13. pcl_ros
  14. pcl_conversions
  15. )
  16. find_package(Eigen3 REQUIRED)
  17. find_package(Ceres REQUIRED)
  18. find_package(GTSAM REQUIRED)
  19. message(STATUS "Using catkin version ${catkin_VERSION}")
  20. message(STATUS "Using Ceres version ${CERES_VERSION}")
  21. catkin_package(
  22. # LIBRARIES ${PROJECT_NAME}
  23. INCLUDE_DIRS include
  24. CATKIN_DEPENDS roscpp message_runtime std_msgs nav_msgs geometry_msgs
  25. )
  26. include_directories(
  27. include
  28. ${catkin_INCLUDE_DIRS}
  29. ${CERES_INCLUDE_DIRS}
  30. ${GTSAM_INCLUDE_DIR}
  31. )
  32. link_directories(
  33. include
  34. ${GTSAM_LIBRARY_DIRS}
  35. )
  36. ## Declare a C++ executable
  37. add_executable(Preprocessing src/Preprocessing.cpp)
  38. target_link_libraries(Preprocessing ${catkin_LIBRARIES})
  39. add_executable(LidarOdometry src/LidarOdometry.cpp)
  40. target_link_libraries(LidarOdometry ${catkin_LIBRARIES} ${CERES_LIBRARIES})
  41. add_executable(BackendFusion src/BackendFusion.cpp src/MarginalizationFactor.cpp)
  42. target_link_libraries(BackendFusion ${catkin_LIBRARIES} ${CERES_LIBRARIES} gtsam)
  43. #For Debug
  44. set(CMAKE_BUILD_TYPE "Debug")