**
在安装完该g2o之后 运行一些程序 如高翔的ch6 代码会出现如下错误
**
CMake Warning at CMakeLists.txt:10 (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
Add the installation prefix of "G2O" to CMAKE_PREFIX_PATH or set "G2O_DIR"
to a directory containing one of the above files. If "G2O" provides a
separate development package or SDK, be sure it has been installed.
解决方式很简单:
主要是CMakeLists.txt上要修改几行代码
本来是这样的就会报错,
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
find_package(G2O REQUIRED)
include_directories(
${G2O_INCLUDE_DIRS} )