加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 2.41 KB
一键复制 编辑 原始数据 按行查看 历史
陈明伟 提交于 2023-07-17 23:23 . first commit
cmake_minimum_required(VERSION 3.0.2)
project(orb_slam3)
set(CMAKE_CXX_FLAGS "-std=c++14")
#-DEIGEN_USE_MKL_ALL")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
cv_bridge
image_transport
message_filters
)
find_package(Eigen3 REQUIRED)
find_package(Pangolin REQUIRED)
find_package(OpenCV REQUIRED)
include_directories(
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${Pangolin_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/slam_module
${PROJECT_SOURCE_DIR}/src/AR
)
add_subdirectory(slam_module)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/src)
add_executable(orb_slam3_mono_node src/ros_mono.cc)
add_dependencies(orb_slam3_mono_node ORB_SLAM3)
target_link_libraries(orb_slam3_mono_node
${catkin_LIBRARIES}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${PROJECT_SOURCE_DIR}/slam_module/lib/libORB_SLAM3.so
)
add_executable(orb_slam3_stereo_node src/ros_stereo.cc)
add_dependencies(orb_slam3_stereo_node ORB_SLAM3)
target_link_libraries(orb_slam3_stereo_node
${catkin_LIBRARIES}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${PROJECT_SOURCE_DIR}/slam_module/lib/libORB_SLAM3.so
)
add_executable(orb_slam3_rgbd_node src/ros_rgbd.cc)
add_dependencies(orb_slam3_rgbd_node ORB_SLAM3)
target_link_libraries(orb_slam3_rgbd_node
${catkin_LIBRARIES}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${PROJECT_SOURCE_DIR}/slam_module/lib/libORB_SLAM3.so
)
add_executable(orb_slam3_mono_inertial_node src/ros_mono_inertial.cc)
add_dependencies(orb_slam3_mono_inertial_node ORB_SLAM3)
target_link_libraries(orb_slam3_mono_inertial_node
${catkin_LIBRARIES}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${PROJECT_SOURCE_DIR}/slam_module/lib/libORB_SLAM3.so
)
add_executable(orb_slam3_stereo_inertial_node src/ros_stereo_inertial.cc)
add_dependencies(orb_slam3_stereo_inertial_node ORB_SLAM3)
target_link_libraries(orb_slam3_stereo_inertial_node
${catkin_LIBRARIES}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${PROJECT_SOURCE_DIR}/slam_module/lib/libORB_SLAM3.so
)
add_executable(orb_slam3_mono_ar_node
src/AR/ros_mono_ar.cc
src/AR/ViewerAR.cc
)
add_dependencies(orb_slam3_mono_ar_node ORB_SLAM3)
target_link_libraries(orb_slam3_mono_ar_node
${catkin_LIBRARIES}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${PROJECT_SOURCE_DIR}/slam_module/Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/slam_module/lib/libORB_SLAM3.so
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化