title: CMake Error: "add_subdirectory not given a binary directory"
body: <p>I am trying to integrate Google Test into the subproject of bigger project and I cannot find the solution that would be satisfying for me.</p>
  <p>I have two constraints:</p>
  <ul>
  <li>the source code of Google Test is already somewhere in the project structure (thus using URL to download it from git repository is not an option)</li>
  <li>the source code of Google Test is not a subdirectory of my subproject (and never will)</li>
  </ul>
  <p>So when I tried to do something like this:</p>
  <pre><code>add_subdirectory( ${GOOGLETEST_PROJECT_LOCATION})
  </code></pre>
  <p>I received:</p>
  <pre><code>CMake Error at unit_tests/CMakeLists.txt:10 (add_subdirectory):
    add_subdirectory not given a binary directory but the given source
    directory &quot;${GOOGLETEST_PROJECT_LOCATION}&quot; is not a subdirectory of
    &quot;${UNIT_TEST_DIRECTORY}&quot;.  When
    specifying an out-of-tree source a binary directory must be explicitly
    specified.
  </code></pre>
  <p>On the other hand maybe <code>ExternalProject_Add</code> could be a solution but I do not know how shall I use it when I do not want to download sources at all and use sources from specific location in the project.</p>
  <p>Project structure looks more or like like this:</p>
  <pre><code>3rdparty 
      |--googletest 
  ...
  subproject
     |--module1
        |--file1.cpp
        |--CMakeLists.txt
     |--module2
        |--file2.cpp
        |--CMakeLists.txt
     |--include
        |--module1
            |--file1.h
        |--module2
            |--file2.h
     |--unit_test
         |--module1
             |--file1test.cpp
         |--module2
             |--file2test.cpp
         |--CMakeLists.txt
     |--CMakeLists.txt
  CMakeLists.txt
  </code></pre>