title: Link static library using CMake
body: <p>I cannot get the library <code>${static_library}</code> to statically link using CMake. I have tried hard coding the path and as far as I'm aware <code>TARGET_LINK_LIBRARIES</code> should link this in automatically. </p>
  
  <pre><code>ADD_LIBRARY(libraryA STATIC ${source_files})
  TARGET_LINK_LIBRARIES(libraryA debug ${static_library})
  </code></pre>
  
  <p>There is a sub project that links <code>libraryA</code> later in the build</p>
  
  <pre><code>ADD_EXECUTABLE(testA ${test_sources}) 
  TARGET_LINK_LIBRARIES(testA libraryA)
  </code></pre>
  
  <p>which has ${static_library} correctly linked in but I need <code>${static_library}</code> to be directly linked into <code>libraryA</code>.</p>