我制作并安装了 aruco 库,它将 Findaruco.cmake 文件放在 /usr/local/lib/cmake 目录中。在我的 CMakeLists.txt 文件中
...
find_package(aruco REQUIRED)
它总是返回标准错误
By not providing "Findaruco.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "aruco", but
CMake did not find one.
Could not find a package configuration file provided by "aruco" with any of
the following names:
arucoConfig.cmake
aruco-config.cmake
Add the installation prefix of "aruco" to CMAKE_PREFIX_PATH or set
"aruco_DIR" to a directory containing one of the above files. If "aruco"
provides a separate development package or SDK, be sure it has been
installed.
我已将环境变量 $CMAKE_PREFIX_PATH 设置为以下各项,但没有任何效果
/usr/local
/usr/local/lib
/usr/local/lib/cmake
唯一有效的是在 CMakeLists 中设置以下内容
set(CMAKE_MODULE_PATH /usr/local/lib/cmake)
我不确定我做错了什么
尝试设置CMake变量称为CMAKE_PREFIX_PATH
,不是环境一。在期间使用 -D 标志cmake
调用:
cmake -D CMAKE_PREFIX_PATH=/usr/local/lib <path to source or build dir>
但是 AFAIR,CMake 应该研究一下/usr/local
前缀作为其默认行为。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)