FindGTest: Imported targets have wrong names
The FindGTest module creates imported targets for 2 GTest libraries, named GTest::Gtest
and GTest::Main
.
However, the upstream GTest project is able to export CMake package config files. There libraries are named GTest::gtest
and GTest::gtest_main
.
Because of different names used you cannot use CONFIG and MODULE modes for find_package(GTest)
interchangeably.
See also