Could not find a package configuration file provided by “GeographicLib“ with any of the following

问题报错:

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版本进行安装:

sudo apt-get install ros-kinetic-geographic-*
sudo apt-get install geographiclib-*
sudo apt-get install libgeographic-*

如果已经安装还是无法编译:(路径问题)

将cmakeList.txt中的:

find_package(GeographicLib REQUIRED)

修改为前面设置安装的默认位置:

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/cmake/geographiclib/")
find_package(GeographicLib REQUIRED)

接下来就可以编译成功了 

 

你可能感兴趣的:(源代码管理,个人开发,Ubuntu,ubuntu,cmake)