title: What use is find_package() when you need to specify CMAKE_MODULE_PATH?
body: <p>I'm trying to get a cross-plattform build system working using CMake. Now the software has a few dependencies. I compiled them myself and installed them on my system.</p>
  
  <p>Some example files which got installed:</p>
  
  <pre><code>-- Installing: /usr/local/share/SomeLib/SomeDir/somefile
  -- Installing: /usr/local/share/SomeLib/SomeDir/someotherfile
  -- Installing: /usr/local/lib/SomeLib/somesharedlibrary
  -- Installing: /usr/local/lib/SomeLib/cmake/FindSomeLib.cmake
  -- Installing: /usr/local/lib/SomeLib/cmake/HelperFile.cmake
  </code></pre>
  
  <p>Now CMake has a <code>find_package()</code> which opens a <code>Find*.cmake</code> file and searches after the library on the system and defines some variables like <code>SomeLib_FOUND</code> etc.</p>
  
  <p>My CMakeLists.txt contains something like this:</p>
  
  <pre><code>set(CMAKE_MODULE_PATH "/usr/local/lib/SomeLib/cmake/;${CMAKE_MODULE_PATH}")
  find_package(SomeLib REQUIRED)
  </code></pre>
  
  <p>The first command defines where CMake searches after the <code>Find*.cmake</code> and I added the directory of <code>SomeLib</code> where the <code>FindSomeLib.cmake</code> can be found, so <code>find_package()</code> works 
  as expected.</p>
  
  <p>But this is kind of weird because one of the reasons why <code>find_package()</code> exists is to get away from non-cross-plattform hard coded paths.</p>
  
  <p>How is this usually done? Should I copy the <code>cmake/</code> directory of <code>SomeLib</code> into my project and set the <code>CMAKE_MODULE_PATH</code> relatively?</p>