title: Platform library name expansion using target_link_libraries with absolute path as library path?
body: <p>Using target_link_libraries in CMake with just the library name, e.g.</p>
  
  <pre><code>target_link_library( myProject SomeLibrary )
  </code></pre>
  
  <p>will expand SomeLibrary to SomeLibrary.lib, libSomeLibrary.so, etc. depending on platform. However, if a full path is specified then the library name is not expanded based on platform, e.g.</p>
  
  <pre><code>target_link_library( myProject ${myProject_SOURCE_DIR}/libs/SomeLibrary )
  </code></pre>
  
  <p>How can I get the library name to be expanded based on platform? Currently, I'm detecting platform in the script and adjusting the library names myself which feels a little ugly.</p>
  
  <p>(Background: over on <a href="https://stackoverflow.com/questions/25164041/is-there-a-link-directories-or-equivilent-property-in-cmake">this question</a> I'm advised to use absolute paths when specifying libraries rather than using link_directories)</p>