title: Cmake is not adding directories correctly with "target_link_directory"
body: <p>I Ubuntu, I am learning about cmake and make, and just trying a simple example. I have two directories: <code>src</code> and <code>build</code>. In <code>src</code>, I have three files: <code>main.cpp</code>, <code>camera.hpp</code>, and <code>CMakeLists.txt</code>, which has (only) the following text:</p>
  
  <pre><code>add_executable(test main.cpp)
  target_link_directory(/home/karnivaurus/Libraries)
  target_link_libraries(test Camera)
  </code></pre>
  
  <p>In <code>/home/karnivaurus/Libraries</code>, I have a shared library called <code>libCamera.so</code>, which I want to link against. My <code>main.cpp</code> uses functions in this library, which are declared in <code>camera.hpp</code>.</p>
  
  <p>Now, in my <code>build</code> directory, I run <code>cmake ../src</code>, and then <code>make</code>. However, I then get linker errors telling me that there are undefined references to some of the functions in my library. If I do a search through all the files and subdirectories in <code>build</code>, there is not mention of <code>libCamera.so</code>.</p>
  
  <p>However, if I remove the <code>target_link_directory</code> line in my <code>CMakeLists.txt</code> file, and instead write the full path to the library when specifying the executable, i.e. <code>target_link_libraries(test /home/karnivaurus/Libraries/libCamera.so)</code>, it compiles and links fine.</p>
  
  <p>Why is <code>target_link_directory</code> not working as expected?</p>