Added error messages for missing libraries.

Added conditional to remove coverage targets when coverage is not enabled.