We have a FindGtest.cmake module in PCL, maybe that would be interesting for Gazebo as well: https://github.com/PointCloudLibrary/pcl/blob/master/cmake/Modules/FindGtest.cmake