当前位置:网站首页>ORBSLAM2 CmakeLists文件结构解析
ORBSLAM2 CmakeLists文件结构解析
2022-07-26 11:00:00 【AutoGalaxy】
(一)引用库
1 自定义库
统一使用如下的语句包含
add_library(${PROJECT_NAME} SHARED
src/System.cc
src/Tracking.cc
src/LocalMapping.cc
src/LoopClosing.cc
src/ORBextractor.cc
src/ORBmatcher.cc
src/FrameDrawer.cc
src/Converter.cc
src/MapPoint.cc
src/KeyFrame.cc
src/Map.cc
src/MapDrawer.cc
src/Optimizer.cc
src/PnPsolver.cc
src/Frame.cc
src/KeyFrameDatabase.cc
src/Sim3Solver.cc
src/Initializer.cc
src/Viewer.cc
)上面的头文件,放在系统官方库中一起
2 系统官方库
统一先使用find_package
find_package(Eigen3 3.1.0 REQUIRED)
find_package(Pangolin REQUIRED)
find_package(OpenCV 3.0 QUIET)
再包含头文件
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${EIGEN3_INCLUDE_DIR}
${Pangolin_INCLUDE_DIRS}
)最后再链接到1中的共享库
target_link_libraries(${PROJECT_NAME}
${OpenCV_LIBS}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so
)(二)生成自己的可执行文件
统一使用
add_executable 和 target_link_libraries 唯一的一个库名叫 ${PROJECT_NAME}
边栏推荐
猜你喜欢

MySQL数据库的简单使用

pytest pytest.ini配置 用例分组 用例跳过

A new technical director asked me to do an IP territorial function~

0x00007ffd977c04a8 (qt5sqld.dll) (in a.exe): 0xc0000005: an access violation occurred when reading position 0x0000000000000010

QT——连接USB摄像头

脉冲波形的产生与变换

Scrapy shell出现的一个错误

pytest fixture装饰器

由浅入深搭建神经网络

Esxi6.5 patch update
随机推荐
Bash shell学习笔记(五)
List and dictionary instance applications (※)
nmap弱点扫描结果可视化转换
BLE之ATT请求
How to assemble a registry?
Esxi6.5 patch update
Pre post pytest method
[reprint] the multivariate normal distribution
35. Search the insertion position
MySQL数据库的简单使用
Definition and use of C language namespace
MySQL learning notes
Logging advanced use
LE Audio规范概述
Linkedblockingqueue of novice source code
How the ThreadPoolExecutor performs tasks
How to configure the jdbcrealm data source?
二分模板总结
菜鸟看源码之HashTable
1837. Sum of digits under k-ary representation