问题背景
在编译我自己写的代码时,发生报错如下:
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "FindOpenGR.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenGR", but
CMake did not find one.
Could not find a package configuration file provided by "OpenGR" with any
of the following names:
OpenGRConfig.cmake
opengr-config.cmake
Add the installation prefix of "OpenGR" to CMAKE_PREFIX_PATH or set
"OpenGR_DIR" to a directory containing one of the above files. If "OpenGR"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
解决方法
这里的 cmake 安装路径我做了修改,默认是安装到 build
文件夹下,我想安装到 /usr
下方便我的使用,否则编译自己的代码时会报错找不到 OpenGRConfig.cmake
。
git clone https://github.com/STORM-IRIT/OpenGR.git
cd OpenGR/
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
sudo make install
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)