当前位置:   article > 正文

编译时遇到 Add the installation prefix of “xxx“ to CMAKE_PREFIX_PATH or set“xxx_DIR“ to a directory_add the installation prefix of "livox_ros_driver"

add the installation prefix of "livox_ros_driver" to cmake_prefix_path or se

例如:

使用Sophus编译时遇到 Add the installation prefix of “Sophus” to CMAKE_PREFIX_PATH or set"Sophus_DIR" to a directory

CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "FindSophus.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Sophus", but
  CMake did not find one.
 
  Could not find a package configuration file provided by "Sophus" with any
  of the following names:
 
    SophusConfig.cmake
    sophus-config.cmake
 
  Add the installation prefix of "Sophus" to CMAKE_PREFIX_PATH or set
  "Sophus_DIR" to a directory containing one of the above files.  If "Sophus"
  provides a separate development package or SDK, be sure it has been
  installed.
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

解决方法:在cmakelist 文件中添加

set(Sophus_DIR "/home/xxx/Sophus/build")      //自己的路径

find_package( Sophus REQUIRED )

include_directories( ${Sophus_INCLUDE_DIRS} )

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/297993
推荐阅读
相关标签
  

闽ICP备14008679号