use custom built opencv along with cv_bridge
After updating to Hydro, the method mentioned in this answer does not work anymore, where I have to depend on cv_bridge to transfer sensor_msgs::Image to cv::Mat. The cmake will strike a warning:
Cannot generate a safe runtime search path for target my_custom_node because there is a cycle in the constraint graph: dir 0 is [/usr/local/lib] dir 1 must precede it due to runtime library [libopencv_calib3d.so.2.4] dir 1 is [/opt/ros/hydro/lib] dir 0 must precede it due to runtime library [libopencv_videostab.so.2.4]
And the built binary is indeed linking the /opt/ros/hydro/lib/libopencv_xxx.so (checked with ldd).
So what is currently the right way to use custom built opencv, while I have dependency like cv_bride
which depends on the opencv2
package?
Thanks for any suggestions.