title: CMake error : "include could not find load file GoogleTest"
body: <p>I have a problem with adding googletests to CMakeLists.txt. </p>
  
  <p>The problem is <strong>"Error:include could not find load file:
    GoogleTest"</strong>.</p>
  
  <p>I have installed google tests using the commands:</p>
  
  <ol>
  <li>sudo apt-get install libgtest-dev</li>
  <li>sudo apt-get install cmake # install cmake</li>
  <li>cd /usr/src/gtest</li>
  <li>sudo cmake CMakeLists.txt</li>
  <li>sudo make</li>
  <li>sudo cp *.a /usr/lib</li>
  </ol>
  
  <p>These commands I took from <a href="https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/" rel="nofollow noreferrer">here</a>.
  There is my CMakeLists.txt:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.6.2)
  
  set(CMAKE_CXX_COMPILER clang++)
  set(CMAKE_CXX_STANDARD 17)
  
  project(compiler)
  
  include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
  
  find_package(FLEX REQUIRED)
  FLEX_TARGET(lexer src/lexer.fl ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
  
  find_package(GTest REQUIRED)
  include(GoogleTest) &lt;- There is a problem!
  add_executable(run_tests src/tests/test.cpp src/main.h ${FLEX_lexer_OUTPUTS})
  target_include_directories(run_tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  target_link_libraries(run_tests ${GTEST_LIBRARIES} stdc++fs)
  #gtest_add_tests(TARGET run_tests)
  
  add_executable(compiler src/main.h src/main.cpp src/common.h ${FLEX_lexer_OUTPUTS})
  </code></pre>
  
  <p>I will be really appreciate if you give me an advice!</p>