title: Get CMake project version added by add_subdirectory
body: <p>I have a CMake project that depends on Google Test library.
  I've added Google Test using <code>ExternalProject_Add</code> and <code>add_subdirectory</code> as described here (<a href="https://github.com/google/googletest/tree/master/googletest" rel="nofollow noreferrer">https://github.com/google/googletest/tree/master/googletest</a> section <code>Incorporating Into An Existing CMake Project</code>).</p>
  
  <p>Now, after command <code>add_subdirectory</code> I want to check version of included project <code>gtest</code> and <code>gmock</code>, however <code>gtest_VERSION</code> and <code>gmock_VERSION</code> variables is undefined. Is it possible to get project version added by <code>add_subdirectory</code>?</p>