title: Cmake link library target link error
body: <p>Hi I have problem with linkg Glfw and other libraries using cmake.
  From command line i compile like this</p>
  
  <pre><code>g++ main.cpp -lGL -lGLU -lGLEW -lglfw
  </code></pre>
  
  <p>But I wanted to use cmake for compiling. I tried to use target_linkg_libraries but this produce error </p>
  
  <blockquote>
    <p>CMake Error at CMakeLists.txt:18 (target_link_libraries):   Cannot
    specify link libraries for target "GL" which is not built by this<br>
    project.</p>
  </blockquote>
  
  <p>I tried do this using add definitions. I dont see error but this don't link libraries.</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.6)
  project (test)
  
  find_package(OpenGL REQUIRED)
  find_package(GLEW REQUIRED)
  
  ADD_DEFINITIONS(
      -lGL
      -lGLU
      -lGLEW
      -lglfw
  )
  
  add_executable(test.out
      main.cpp
  )
  
  target_link_libraries(GL GLU GLEW glfw)
  </code></pre>