编译时出现如下错误:
CMake Error at CMakeLists.txt:11 (find_package):
By not providing "FindG2O.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "G2O", but
CMake did not find one.
Could not find a package configuration file provided by "G2O" with any of
the following names:
G2OConfig.cmake
g2o-config.cmake
解决办法:
修改CMakeLists.txt文件,
将 list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules )
修改为 list( APPEND CMAKE_MODULE_PATH /home/libs/g2o/cmake_modules ) 路径为g2o安装位置