title: CMake target_link_libraries converting path which results in linker "not found" error
body: <p>I'm using CMake to build a module for an external application. As part of the build, I'm also generating an executable which links against the module to run tests. However as part of module convention for the external application, the module name should not have the <code>lib</code> prefix. This results in the following <code>CMakeLists.txt</code>:</p>
  <pre><code>add_library(mymodule SHARED mymodule.c)
  set_target_properties(mymodule PROPERTIES PREFIX &quot;&quot;)
  
  add_executable(mytest mytest.c)
  target_link_libraries(mytest ${CMAKE_BINARY_DIR}/mymodule.so)
  </code></pre>
  <p>When building, CMake is converting the path to a search name, which results in the error:</p>
  <pre><code>/usr/bin/ld: cannot find -lmymodule
  </code></pre>
  <p>If I run <code>cmake .</code> again (without changing anything) after <code>mymodule.so</code> is built, it switches from using <code>-lmymodule</code> to the actual path of <code>mymodule.so</code>, and it works. If I remove the <code>PROPERTIES PREFIX &quot;&quot;</code>, it also works.</p>
  <p>Since I'm specifying the <code>mymodule.so</code> path within <code>target_link_libraries()</code>, how can I get CMake to stop converting it into search name (<code>-lmymodule</code>)?</p>