title: How to use CMake to install
body: <p>I can build my projects successfully with CMake, but can I use it to install the results?</p>
  
  <p>With <code>Make</code> I add the target <code>install</code> and call that from the command line. I cannot figure out if this is possible with CMake.</p>
  
  <p>The final goal is to install a static library, dynamic library and corresponding header files in a platform-portable way. How I imagine it would work: On Linux, copy to <code>/usr/include</code> and <code>/usr/lib</code>. On Windows it would probably be a user-provided folder with an include and lib folder.</p>
  
  <p>The <a href="https://cmake.org/cmake/help/v3.0/command/install.html" rel="noreferrer">install rule</a> suggests that something like this is possible. But how do I actually use it?</p>
  
  <p>Currently I do the following:</p>
  
  <ol>
  <li>mkdir build</li>
  <li>cd build</li>
  <li>cmake ..</li>
  <li>cmake --build .</li>
  </ol>
  
  <p>Here I would expect to do something like this:</p>
  
  <ol start="5">
  <li>cmake --install .</li>
  </ol>