add local opencv to path
I want to compile my ROS node with the opencv which is at /usr/local/ I have tried the following rosanswers
I could compile my code without errors. But when i run the node, i get the following error.
undefined reference to `cv::cuda::createStereoBM(int, int)'
I checked my CMakeCache.txt to see the path for the opencv directories and I get this
/usr/local/share/OpenCV
The libraries for cudastereo.hpp are in /usr/local/include and not in /usr/local/share. How do I get my CMakeLists.txt to get the correct OpenCV as I am able to run the code outside ROS with no errors. My CMakeLists.txt is as follows
find_package(OpenCV REQUIRED
NO_MODULE
PATHS /usr/local
NO_DEFAULT_PATH)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_executable(flir_node src/flir_node.cpp)
target_link_libraries(flir_node ${catkin_LIBRARIES} )
Any suggestions? Thanks!