GTest: FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find GTest

Share:
GTest: FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find GTest ## Problem description ```sh CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY) Call Stack (most recent call first): /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.10/Modules/FindGTest.cmake:196 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:39 (find_package) -- Configuring incomplete, errors occurred! See also "/home/yubao/data/project/slambook2/myslam/build/CMakeFiles/CMakeOutput.log". ``` ## My Environment - Ubuntu 18.04 - Cmake: v3.10 - Cmake file ```sh find_package(GTest REQUIRED) ``` ## Solution ```sh export GTEST_ROOT=/home/yubao/data/software/gooltest ``` ![yubao_blog_cover](https://raw.githubusercontent.com/yubaoliu/assets/image/yubao_blog_cover.png)

No comments