title: Where should I install FindXXX.cmake file of my own project and how to find it?
body: <p>I am developing two CMake projects: <code>libABC</code> and <code>libXYZ</code>. <code>libXYZ</code> requires <code>libABC</code>, and so I would like install <code>FindABC.cmake</code> in an appropriate location on Mac and Linux machines.</p>
  
  <p><code>libABC</code> and its related files are installed under <code>/usr/local</code> by default, and I think <code>FindABC.cmake</code> also should be installed under the same directory. I tried installing it in the following six different locations.</p>
  
  <p><code>/usr/local/lib/cmake/ABC/FindABC.cmake</code> <br>
  <code>/usr/local/share/cmake/ABC/FindABC.cmake</code> <br>
  <code>/usr/local/lib/ABC/FindABC.cmake</code> <br>
  <code>/usr/local/share/ABC/FindABC.cmake</code> <br>
  <code>/usr/local/lib/ABC/cmake/FindABC.cmake</code> <br>
  <code>/usr/local/share/ABC/cmake/FindABC.cmake</code> <br></p>
  
  <p>However <code>CMakeList.txt</code> of <code>libXYZ</code> cannot find it with the following error.</p>
  
  <pre><code>CMake Error at CMakeLists.txt:51 (find_package):
    By not providing "FindABC.cmake" in CMAKE_MODULE_PATH this project
    has asked CMake to find a package configuration file provided by
    "ABC", but CMake did not find one.
  </code></pre>
  
  <p>My <code>cmake</code> command was installed under <code>/opt/local</code> by using MacPorts on OS X. So I think it searches not <code>/usr/local</code> but only <code>/opt/local</code>.</p>
  
  <p>I know that defining <code>CMAKE_MODULE_PATH</code> when executing <code>cmake</code> command solve this issue (e.g., <code>cmake -DCMAKE_MODULE_PATH=/usr/local/lib/cmake/ABC</code>), but I do not want to ask all users to do it every time.</p>
  
  <p>My questions are</p>
  
  <p>Q1. Where should I install <code>FindABC.cmake</code> during the <code>libABC</code> installation process?</p>
  
  <p>Q2. How do I properly find <code>FindABC.cmake</code> in <code>CMakeLists.txt</code> of <code>libXYZ</code> without hard-coding <code>CMAKE_MODULE_PATH</code> in it?</p>