title: How can I get the list of dependencies of cmake target?
body: <p>For instance, how can I know if my executable target E depends on my library target L?</p>
  
  <p>Let's image E depends on L1 and L2, but I don't know if they depend on L.</p>
  
  <blockquote>
    <p>target_link_libraries(E L1 L2)</p>
  </blockquote>
  
  <p>I'd like to get the list from CMake itself before calling <code>target_link_libraries</code>, so that I can do some tricks if I detect that E depends on two libraries which are incompatible. I played a bit with <code>GetPrerequisites</code>, but this finds out dependencies on existing libraries which are on disk, not on target which are being built.</p>
  
  <p>thanks</p>