• Could not find a package,configuration file provided by "G2O" ,G2OConfig.cmake,g2o-config.cmake


     因为项目需要使用到g2o,所以自己从git上面clone下来,

    git clone https://github.com/RainerKuemmerle/g2o.git

    然后:

    cd g2o

    mkdir build

    cd build

    cmake ..

    make -j4

     编译完成,并在CMakeLists.txt使用g2o:

    set(G2O_DIR ..)

    find_package(....

    但是后面报这个错误:

    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
    

    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.

    -- Configuring incomplete, errors occurred!

    其实是我链接的g2o错误了,应该这样:

    LIST( APPEND CMAKE_MODULE_PATH /XXX/g2o/cmake_modules )
    SET( G2O_ROOT /home/xxx/g2o )
    FIND_PACKAGE( G2O REQUIRED )
    然后就可以啦。
  • 相关阅读:
    Redis 常用命令整理
    TCP系列01—概述及协议头格式
    TCP/IP详解--TCP网络传输数据包1460MSS和1448负载
    TCP中报文段大小(MSS)、MTU
    DNS 过滤脚本
    TCP SYN Cookies – DDoS defence
    python virtualenv venv 虚拟环境
    git 命令总结
    王兴三横四纵
    获取国税门户可供下载的资源文档
  • 原文地址:https://www.cnblogs.com/YouXiangLiThon/p/8671321.html
Copyright © 2020-2023  润新知