title: CMake install (TARGETS in subdirectories)
body: <p>Consider the following <code>CMakeLists.txt</code> file:</p>
  
  <pre><code>add_subdirectory(execA)
  add_subdirectory(libB)
  
  install(TARGETS execA libB
          RUNTIME DESTINATION bin
          LIBRARY DESTINATION lib
          ARCHIVE DESTINATION lib)
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>install TARGETS given target "execA" which does not exist in this
    directory
  </code></pre>
  
  <p><code>execA</code> and <code>libB</code> have their own <code>CMakeList.txt</code> files and are located under <code>project</code> directory, as well as the build directory I'm running <code>cmake</code> (<code>cmake ..</code>):</p>
  
  <pre><code>project
    |------ CMakeList.txt (the one with the code)
    |----execA
    |      \- .cpp, .hpp and CMakelist.txt
    |----libB
    |      \- .cpp, .hpp and CMakelist.txt
    |---- lib
    |---- bin
    \---- build (where I´m commanding: $ cmake ..
  </code></pre>
  
  <p>How do I fix this error?</p>