title: cmake add_library, followed by install library destination
body: <p>I am trying to run cmake to generate makefiles. In the minimum working example, I have three files and 1 build directory.</p>
  
  <p>File 1 is CMakeLists.txt, containing exactly:</p>
  
  <pre><code>add_library (MathFunctions SHARED mysqrt.cxx)
  install (TARGETS MathFunctions LIBRARY DESTINATION lib)
  </code></pre>
  
  <p>File 2 is MathFunctions.h containing the function prototype, function relates to mysqrt.cxx.</p>
  
  <p>File 3 is mysqrt.cxx containing include statement and a function definition.</p>
  
  <p>When I create a build sub-directory and run "cmake ..", I am getting</p>
  
  <pre><code>CMake Error at CMakeLists.txt:2 (install):
    install Library TARGETS given no DESTINATION!
  </code></pre>
  
  <p>Isn't my add_library, then install statement grammar correct? If I remove both SHARED and LIBRARY, cmake builds without errors.</p>
  
  <p>Thanks for your help.</p>