title: how do i specify libraries's path to cmake which are used by target_link_libraries
body: <p>I have some codebase which has <code>cmake</code> build system .while building iam getting an error as below</p>
  
  <pre><code>/usr/bin/ld: cannot find -lcurl
  </code></pre>
  
  <p>below is the sample <code>cmakelist.txt</code></p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8.6)
  project(oci_object_test)
  
  set(IB_HOME /home/user/sample_cmake/usr/lib)
  
  include_directories(${LIB_HOME}/include)
  link_directories(${LIB_HOME}/lib64)
  
  link_directories(/home/user/sample_cmake/usr/lib/lib64)
  link_directories(/home/user/)
  
  set(SOURCES
          sample.cpp
  )
  
  add_executable(demo ${SOURCES})
  target_link_libraries(demo curl openssl) 
  </code></pre>
  
  <p>for the above <code>cmakelist.txt</code> below is the <code>link.txt</code> generated by cmake</p>
  
  <pre><code>/usr/bin/c++      CMakeFiles/demo.dir/sample.cpp.o  -o demo  -L/home/user/sample_cmake/usr/lib/lib64  -L/home/user -rdynamic -lcurl -lopenssl -Wl,-rpath,/home/user/sample_cmake/usr/lib/lib64:/home/user 
  </code></pre>
  
  <p>this issue is due to <code>-lcurl</code> getting added in <code>link.txt</code> generated by cmake . if i remove <code>-lcurl</code> from <code>link.txt</code> manually and build ,build will get success with no linker error . So is there any way i can get rid off this <code>-lcurl</code> in <code>link.txt</code> or is it possible to define -lcurl path where it actual libcurl present ( for example suppose libcurl present inside <code>/usr/curl_path/curl</code>)  so that cmake could generate link.txt as below?</p>
  
  <pre><code>/usr/bin/c++      CMakeFiles/demo.dir/sample.cpp.o  -o demo  -L/home/user/sample_cmake/usr/lib/lib64  -L/home/user -rdynamic /usr/curl_path/curl -lopenssl -Wl,-rpath,/home/user/sample_cmake/usr/lib/lib64:/home/user 
  </code></pre>
  
  <p>i know i can define <code>libucrl</code> path directly as below which will solve my issue ,</p>
  
  <pre><code>target_link_libraries(demo /usr/curl_path/curl openssl) 
  </code></pre>
  
  <p>but iam looking for something like <code>SET</code>  or any other <code>cmake environment variable</code> which i can define inside toolchain.cmake file so that <code>cmakelist.txt</code> is untouched ,<code>in simple words how do i specify those  libraries's path to cmake which are going use inside target_link_libraries</code></p>