Ubuntu 18.04 ros2 Dasing C++
Hi, I don't understand well where my CMakeLists get the packages, but it takes the ones installed when I installed ROS2 (std_msgs, sensor_msgs, rclcpp...), now I want to get a package from another directory, in this case I want to find armadillo.
I think this have to be easy, but I dont figure out how to do it.
When I try to look for armadillo with find_package(armadillo REQUIRED)
in the CMakeLists.txt
an error jump to my terminal:
CMake Error at CMakeLists.txt:18 (find_package): By not providing "Findarmadillo.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by
"armadillo", but CMake did not find one.Could not find a package configuration file provided by "armadillo" with any of the following names:
armadilloConfig.cmake armadillo-config.cmake
Add the installation prefix of "armadillo" to CMAKE_PREFIX_PATH or set "armadillo_DIR" to a directory containing one of the above files. If "armadillo" provides a separate development package or SDK, be sure it has been installed.
I tried several things in touching the CMakeLists.txt but no one works, I added this in the package.xml too:
<build_depend>armadillo</build_depend>
<exec_depend>armadillo</exec_depend>
And this is what I have about armadillo in my CMakeLists.txt at the moment:
find_package(armadillo REQUIRED)
add_library(armadillo STATIC IMPORTED)
set_target_properties(armadillo PROPERTIES IMPORTED_LOCATION /home/user/armadillo/armadillo-9.850.1)
add_executable(editer src/imagediter.cpp )
ament_target_dependencies(editer
"armadillo"
"rclcpp"
"std_msgs"
"opencv2"
"sensor_msgs"
"cv_bridge"
)
Maybe is not necessary, but I post it can be usefull
Originally posted by Waboqueox on ROS Answers with karma: 11 on 2020-02-21
Post score: 0