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

CMake should be adding RPATH entries in your build tree automatically. You may need to add paths for your install tree manually.