The `target_link_libraries` need to be wrapped with a conditional block of `GTEST_FOUND` because the `catkin_add_gtest` function is skipped if `GTEST_FOUND` isn't true.