By not providing “FindGeographicLib.cmake“ in CMAKE_MODULE_PATH

错误如下:

By not providing "FindGeographicLib.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "GeographicLib", but CMake did not find one.

  Could not find a package configuration file provided by "GeographicLib"
  with any of the following names:

    GeographicLibConfig.cmake
    geographiclib-config.cmake

  Add the installation prefix of "GeographicLib" to CMAKE_PREFIX_PATH or set
  "GeographicLib_DIR" to a directory containing one of the above files.  If
  "GeographicLib" provides a separate development package or SDK, be sure it
  has been installed.

解决方法:

使用以下命令在Ubuntu上安装GeographicLib:

sudo apt-get install libgeographic-dev

安装库后,在CMakeLists.txt文件中提供FindGeographicLib.cmake文件的路径。这个文件通常位于/usr/share/cmake/geographiclib/目录。在CMakeLists.txt文件的顶部添加以下行:

list(APPEND CMAKE_MODULE_PATH "/usr/share/cmake/geographiclib")

这行命令告诉CMake在查找包时也搜索/usr/share/cmake/geographiclib目录。

做完这些更改后,再次编译即可。

你可能感兴趣的:(异常调试,机器人)