title: install EXPORT problem for library with dependencies
body: <p>I try to build two libraries (say <em>A</em> and <em>B</em>) from one project. I use <code>add_subdirectory</code> cmake command in root cmake file. <em>B</em> depends on <em>A</em>.</p>
  
  <p>When I try to add</p>
  
  <pre><code>INSTALL (TARGETS B EXPORT B
      PUBLIC_HEADER DESTINATION "include/B"
      LIBRARY DESTINATION "lib"
      ARCHIVE DESTINATION "lib")
  
  INSTALL (EXPORT B DESTINATION "./")
  </code></pre>
  
  <p>CMake warns me about error in line with <code>INSTALL (EXPORT ...</code>. It prints:</p>
  
  <blockquote>
    <p>CMake Error: INSTALL (EXPORT "B" ...) includes target "B" which requires target "A" that is not in the export set.</p>
  </blockquote>