FindGTest: GTEST_INCLUDE_DIRS not set with upstream cmake package
I am running CMake 3.20.2 on Mac Catalina (10.15). I have built gtest and installed it on the system with sudo make install. gtest exists in /usr/include. But when I run cmake lines: find_package(GTest REQUIRED)
, GTEST_FOUND
is true but GTEST_INCLUDE_DIRS
is not set. Under what circumstances does GTEST_INCLUDE_DIRS
either get set or not by the call to find_package
? The CMake docs say these should be set as result variables but only one seems to be set. I crosschecked my CMake files on Ubuntu (CMake 3.16) and all is well with GTEST_INCLUDE_DIRS
there.
Edited by Brad King