title: CMake pkg_check_modules does not search the CMAKE_PREFIX_PATH
body: <p>I am trying to compile a project that uses <code>CMake</code> and <code>pkg_check_modules</code> where I cannot get <code>pkg_check_modules</code> to find libraries located under <code>CMAKE_PREFIX_PATH</code>.</p>
  
  <p>I believe the following example recreates the problem:</p>
  
  <p>If I have <code>libtest.so</code> located in <code>/home/user/test/lib</code>, then given the <code>CMakeLists.txt</code>:</p>
  
  <pre><code>include(FindPkgConfig)
  pkg_check_modules(
    TEST
    REQUIRED
    libtest
  )
  </code></pre>
  
  <p>...and running it with:</p>
  
  <pre><code>cmake -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DCMAKE_PREFIX_PATH=/home/user/test .
  </code></pre>
  
  <p>...results in the error:</p>
  
  <pre><code>No package 'libtest' found
  </code></pre>
  
  <p>I also tried running against <code>strace -v -f</code>, which does include an <code>access</code> attempt for <code>/home/user/test/lib/pkgconfig</code>, but logs nothing for <code>libtest</code>.</p>
  
  <p>I am using Ubuntu 16.04 and CMake 3.5.1</p>