Hello, I have installed cmake 3.28.1-1 and googletest 1.14.0-1 from
Debian testing, and I'm trying to use GTest with CMake as follows:
```
# CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
project(foo)
enable_testing()
find_package(GTest REQUIRED)
add_executable(foo foo.cc)
target_link_libraries(foo GTest::gtest GTest::gtest_main)
add_test(AllTestsInFoo foo)
```
```
// foo.cc
TEST(Foo, foo) {
EXPECT_EQ(1 + 2, 3);
}
```
This is very close to the example provided in /usr/share/cmake-3.28/Modules/FindGTest.cmake,
but it fails:
```
$ cmake .
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR
GTEST_MAIN_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.28/Modules/FindGTest.cmake:270 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:5 (find_package)