[CMake] Add dependencies to gtest.