我是C ++初学者。我需要使用一个库:ROPTLIB https://github.com/whuang08/ROPTLIB来实现6自由度姿势估计算法。 我下载了该库,然后使用make命令创建文件libropt.so。然后,我将此文件移动到/ usr / local / lib中,并在目录上使用了ldconfig。
但是文件保持不变,我的CMake出现以下错误:
CMake Error at CMakeLists.txt:8 (find_package):
By not providing "FindROPT.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ROPT", but
CMake did not find one.
Could not find a package configuration file provided by "ROPT" with any of
the following names:
ROPTConfig.cmake
ropt-config.cmake
Add the installation prefix of "ROPT" to CMAKE_PREFIX_PATH or set
"ROPT_DIR" to a directory containing one of the above files. If "ROPT"
provides a separate development package or SDK, be sure it has been
installed.
我的CMakeLists:
cmake_minimum_required(VERSION 3.10)
project(c__traduction CXX)
find_package(OpenCV REQUIRED)
find_package(GSL REQUIRED)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
find_package(ROPT REQUIRED)
include_directories("${PROJECT_BINARY_DIR}")
set(CMAKE_CXX_STANDARD 11)
add_executable(c__traduction main.cpp utils.h utils_struct.h utils2.h utils_struct2.h Problem.h utils3.h)
target_compile_options( c__traduction PUBLIC -std=c++11 -fpermissive -w -Wall )
target_link_libraries(c__traduction ${OpenCV_LIBS})
target_link_libraries(c__traduction GSL::gsl GSL::gslcblas)
target_link_libraries(c__traduction ropt)
我也使用GSL,OpenCV,BLAS和LAPACK。
我的项目非常简单,只有3个文件:main.cpp,utils3.h和utils_struct2.h
我该怎么办?
谢谢