代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 17)
project(VIPL-SLAM)
# MACRO predefine the system, used in code to determine
if(WIN32)
add_compile_definitions(SYSTEM_WINDOWS)
elseif(UNIX)
add_compile_definitions(SYSTEM_LINUX)
endif()
MATH(EXPR stack_size "32*1024*1024")
set(M_SOURCES
main.cpp
camera/AbstractCamera.cpp
camera/RS_Camera.cpp
camera/LocalVideo.cpp
camera/USB_Camera.cpp
camera/USB_Camera.hpp
camera/ImageSet.cpp
camera/ImageSet.h
utils/FrameMetadata.cpp
utils/FrameMetadata.h
ui/map_vis.cpp
ui/map_vis.h
utils/ThreadCommBuffer.cpp
utils/ThreadCommBuffer.h
utils/utils.cpp
evaluation/evaluation_method.cpp
)
set(M_HEADERS
AbstractCamera.h
RS_Camera.hpp
LocalVideo.hpp
utils/utils.h
evaluation/evaluation_method.h
)
set(fmt_DIR /opt/fmt/8.1.1/lib/cmake/fmt)
set(OpenCV_DIR /opt/opencv/4.5.5_vino_ex/lib/cmake/opencv4)
set(Pangolin_DIR /opt/pangolin/0.6/lib/cmake/Pangolin)
set(g2o_DIR /opt/g2o/20201223_git/lib/cmake/g2o)
set(Eigen_DIR /opt/eigen3/share/eigen3/cmake)
set(Sophus_DIR /opt/sophus/share/sophus/cmake)
set(Qt5_DIR /opt/qt/Qt5.14.2/5.14.2/gcc_64/lib/cmake/Qt5)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(OpenCV)
find_package(realsense2)
find_package(fmt REQUIRED)
find_package(Pangolin REQUIRED)
find_package(g2o REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(Sophus REQUIRED)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${Pangolin_INCLUDE_DIRS})
include_directories(${realsense2_INCLUDE_DIRS})
include_directories(${g2o_INCLUDE_DIRS})
include_directories(${Eigen3_INCLUDE_DIRS})
include_directories(${Sophus_INCLUDE_DIRS})
include_directories(${fmt_INCLUDE_DIRS})
include_directories(${Qt5Core_INCLUDE_DIRS})
include_directories(${Qt5Gui_INCLUDE_DIRS})
include_directories(${Qt5Widgets_INCLUDE_DIRS})
include_directories(
.
./evaluation
)
# 打印所有变量及其值
get_cmake_property(_variableNames VARIABLES)
foreach(_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
add_executable(VIPL-SLAM ${M_SOURCES})
target_link_libraries(VIPL-SLAM ${OpenCV_LIBS})
target_link_libraries(VIPL-SLAM pangolin)
target_link_libraries(VIPL-SLAM GL)
target_link_libraries(VIPL-SLAM realsense2)
target_link_libraries(VIPL-SLAM fmt)
set(TEST_SOURCES
test.cpp
utils/utils.cpp
camera/AbstractCamera.cpp
camera/ImageSet.cpp
evaluation/evaluation_method.cpp
)
add_executable(test ${TEST_SOURCES})
target_link_libraries(test ${OpenCV_LIBS})
target_link_libraries(test pangolin)
target_link_libraries(test GL)
target_link_libraries(test realsense2)
target_link_libraries(test Sophus::Sophus)
target_link_libraries(test fmt)
add_executable(
trajectory_visualization
utils/utils.cpp
evaluation/evaluation_method.cpp
trajectory_visualization/trajectory_plot.cpp
)
target_link_libraries(trajectory_visualization ${OpenCV_LIBS})
target_link_libraries(trajectory_visualization pangolin)
target_link_libraries(trajectory_visualization GL)
target_link_libraries(trajectory_visualization realsense2)
target_link_libraries(trajectory_visualization Sophus::Sophus)
target_link_libraries(trajectory_visualization fmt)
set(TEST_GUI_SOURCES
test_gui/ui/mainwindow.ui
test_gui/ui/mainwindow.cpp
test_gui/main.cpp
test_gui/resources/resources.qrc)
add_executable(test_gui ${TEST_GUI_SOURCES})
target_link_libraries(test_gui ${OpenCV_LIBS})
target_link_libraries(test_gui pangolin)
target_link_libraries(test_gui GL)
target_link_libraries(test_gui realsense2)
target_link_libraries(test_gui Sophus::Sophus)
target_link_libraries(test_gui fmt)
target_link_libraries(test_gui Qt5::Widgets)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。