title: Install libraries into MSYS2 from source
body: <p>I have installed MSYS2 along with mingw64 on windows. </p>
  
  <p>How do I install an application or library (in this case OpenCV) from the source code into mingw64 in the same way as pacman does, ideally using the CMAKE-GUI (due to a number of options to set)?</p>
  
  <p>I have tried using  </p>
  
  <ol>
  <li>Use CMake-Gui to generate a mingw-makefile, with an additional DCMAKE_INSTALL_PREFIX:PATH entry.</li>
  <li>Running mingw64 make installed</li>
  <li>The code compiles fine but then installing into the CMAKe build directory4</li>
  <li>MSYS pkg-manager can not see the library (opencv)</li>
  </ol>