CMake Error at RRT-Plugin-master/CMakeLists.txt:23 (find_package): By not providing "FindOMPL.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OMPL", but CMake did not find one. Could not find a package configuration file provided by "OMPL" with any of the following names: OMPLConfig.cmake ompl-config.cmake Add the installation prefix of "OMPL" to CMAKE_PREFIX_PATH or set "OMPL_DIR" to a directory containing one of the above files. If "OMPL" provides a separate development package or SDK, be sure it has been installed.
时间: 2023-06-24 07:05:49 浏览: 240
cmake-3.10.0-rc3-win64-x64.rar_Cmake3.10.0_Cmake3.10.0下载_cmake 3
这个错误提示表明 CMake 找不到 OMPL 库的安装路径。有两种方法可以解决这个问题:
1. 将 OMPL 库的安装路径添加到环境变量 `CMAKE_PREFIX_PATH` 中。可以通过在终端中运行以下命令来设置环境变量:
```
export CMAKE_PREFIX_PATH=/path/to/ompl:$CMAKE_PREFIX_PATH
```
2. 设置 `OMPL_DIR` 变量为 OMPL 库的安装路径。可以在 CMakeLists.txt 文件中添加以下代码:
```
set(OMPL_DIR /path/to/ompl)
```
其中 `/path/to/ompl` 为 OMPL 库的安装路径。如果您不知道 OMPL 库的安装路径,可以使用以下命令来查找:
```
sudo find / -name "OMPLConfig.cmake" -print 2>/dev/null
```
这个命令将会在系统中搜索名为 `OMPLConfig.cmake` 的文件,并输出它们的路径。
阅读全文