title: Regenerate pkg-config file `opencv.pc` without recompiling
body: <p>I compiled the OpenCV library (version 4) on Raspbian with the following commands in a subdirectory I created:</p>
  
  <pre><code>cmake -D CMAKE_INSTALL_PREFIX=./ -D CMAKE_BUILD_TYPE=Debug ../
  make -j4
  make install
  </code></pre>
  
  <p>and I was using the pkg-config file <code>opencv.pc</code> to compile a project with a <code>Makefile</code>.</p>
  
  <p>I had to move the library folder to another directory so the file <code>opencv.pc</code> points to wrong paths. However the dynamic libraries should be still valid (shouldn't they?).</p>
  
  <p>So how can regenerate the <code>opencv.pc</code> file without recompiling the all library on Raspbian which takes a lot of time?</p>
  
  <p><strong>EDIT 1</strong>
  Trying to rerun <code>cmake -D CMAKE_INSTALL_PREFIX=./ -D CMAKE_BUILD_TYPE=Debug ../</code>  results in the following error:</p>
  
  <pre><code>CMake Error: The current CMakeCache.txt directory /home/pi/opencv-2.4.13/build/CMakeCache.txt is different than the directory /home/pi/OldDirectory/opencv-2.4.13/build/ where CmakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure reedit CMakeCache.txt 
  CMake Error The source "NewSourcePath" does not match the source "NewSourcePath" used to generate cache. Re-run cmake with a different source directory.
  </code></pre>