CMake expects the targets gtest gtest_main gmock (at cmake/SapiDeps.cmake:48, while externally installed googletest usually exposes these under the GTest namespace, eg as GTest::gtest instead.
Relatedly, set(ABSL_FIND_GOOGLETEST OFF) in cmake/abseil-cpp.cmake makes it hard to use external gtest for the absl subdependency.
Was it intentional to not support external gtest? I've found that one workaround for these is to add aliases for the gtest targetes, and to set ABSL_FIND_GOOGLETEST=ON.
CMake expects the targets
gtestgtest_maingmock(atcmake/SapiDeps.cmake:48, while externally installed googletest usually exposes these under theGTestnamespace, eg asGTest::gtestinstead.Relatedly,
set(ABSL_FIND_GOOGLETEST OFF)incmake/abseil-cpp.cmakemakes it hard to use external gtest for the absl subdependency.Was it intentional to not support external gtest? I've found that one workaround for these is to add aliases for the gtest targetes, and to set ABSL_FIND_GOOGLETEST=ON.