我创建并安装了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)
我不知道我做错了什么
发布于 2015-10-21 06:03:50
尝试设置CMake变量CMAKE_PREFIX_PATH
,而不是环境变量CMAKE_PREFIX_PATH
。在-D调用期间使用cmake
标志:
cmake -D CMAKE_PREFIX_PATH=/usr/local/lib <path to source or build dir>
但是,CMake应该将/usr/local
前缀作为它的默认行为。
https://stackoverflow.com/questions/33251390
复制相似问题