Library "not found" after building test with CMake on Ubuntu.

OpenCV might be setting some settings apart from default CMake settings like that. But CMAKE_INSTALL_RPATH_USE_LINK_PATH could certainly help here.