ros-fuerte cannot find opencv package
Hi there,
I have installed ros-fuerte-desktop-full. I am trying to built a package that contains opencv code, but I am getting the following error:
Cannot specify link libraries for target "MatObjects" which is not built by this project.
I have added following to CMakeLists.txt
FIND_PACKAGE( OpenCV REQUIRED )
target_link_libraries(MatObjects ${OpenCV_LIBS})
Here is the output of some flags:
#echo $PKG_CONFIG_PATH
/opt/ros/fuerte/lib/pkgconfig
This path contains opencv.pc
#pkg-config --cflags opencv
-I/opt/ros/fuerte/include/opencv -I/opt/ros/fuerte/include
#pkg-config --libs opencv
-L/opt/ros/fuerte/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_ts -lopencv_video -lopencv_videostab
I have also tried to run the code on Geany using g++ with pkg-config --cflags opencv
but it says Package opencv was not found in the pkg-config search path
when it is there.
Please help.