0

I have the following cmake file:

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/find_modules)

find_package(gtest REQUIRED)
find_package(EasyLOGGINGPP REQUIRED)

And I get the following errors:

-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE GTEST_MAIN_LIBRARY)
-- Could NOT find EASYLOGGINGPP (missing: EASYLOGGINGPP_INCLUDE_DIR)

I downloaded, compiled and installed each package, of which they are located:

C:\Program Files (x86)\googletest-distribution
and
C:\Program Files (x86)\Easyloggingpp

But CMake still refuses to find them... Am I really missing something?

JamieRhys
  • 206
  • 6
  • 24
  • Seraching GTest and EasyLogging packages is technically **unrelated problems**; on Stack Overflow we tend to *avoid asking* about unrelated problems in the single question post. There are several questions on Stack Overflow about finding GTest with CMake. E.g. you may find [this answer](https://stackoverflow.com/a/48929753/3440745) useful. – Tsyvarev Aug 28 '18 at 17:50
  • If you are trying to find a *generic way* for hint CMake about finding packages, you may find [that question](https://stackoverflow.com/questions/34795816/hinting-findname-cmake-files-with-a-custom-directory) useful. Note, that you need to add *both* installation directories (`C:\Program Files (x86)\googletest-distribution` and `C:\Program Files (x86)\Easyloggingpp`) to `CMAKE_PREFIX_PATH` variable for make things work. – Tsyvarev Aug 28 '18 at 17:52

0 Answers0