加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
huanglilong 提交于 2021-12-25 10:07 . add gtsam
cmake_minimum_required(VERSION 3.10)
project(vio_bag_sim)
set(CMAKE_CXX_FLAGS "-std=c++14 -march=native")
set(CMAKE_BUILD_TYPE Release)
# suppress opengl warning
set(OpenGL_GL_PREFERENCE GLVND)
# OpenCV 4
find_package(OpenCV 4 REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
# Boost
find_package(Boost REQUIRED)
find_package(Boost COMPONENTS filesystem thread REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
# glog
find_package(glog 0.6.0 REQUIRED)
include_directories(${GLOG_INCLUDE_DIR})
# pangolin
find_package(Pangolin REQUIRED)
include_directories(${Pangolin_INCLUDE_DIRS})
# Sophus
find_package(Sophus REQUIRED)
include_directories(${Sophus_INCLUDE_DIRS})
# fmt
find_package(fmt REQUIRED)
# g2o
find_package(g2o REQUIRED)
include_directories(${G2O_INCLUDE_DIRS})
# gtsam
find_package(GTSAM REQUIRED)
include_directories(${GTSAM_INCLUDE_DIR})
# Eigen
include_directories("/usr/include/eigen3")
find_package(fast REQUIRED)
include_directories(${fast_INCLUDE_DIRS})
# ros
find_package(catkin REQUIRED COMPONENTS
cv_bridge
geometry_msgs
image_transport
roscpp
rosbag
sensor_msgs
std_msgs
)
include_directories(
${PROJECT_SOURCE_DIR}
${catkin_INCLUDE_DIRS}
)
set(THIRD_PARTY_LIBS
${catkin_LIBRARIES}
${OpenCV_LIBS}
${fast_LIBRARIES}
${Sophus_LIBRARIES}
${Pangolin_LIBRARIES}
glog::glog
g2o_core g2o_stuff
gtsam
fmt::fmt
)
# vio algorithm
add_subdirectory(vio)
# vio bag simulation
add_library(vio_bag_sim vio_bag_sim.cc)
target_link_libraries(vio_bag_sim ${THIRD_PARTY_LIBS} vio_isam2)
# simulation
add_executable(main_sim main_sim.cc)
target_link_libraries(main_sim vio_bag_sim)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化