title: How to setup a Find*.cmake for find_package in Module mode?
body: <p>I have an external dependency (headers and shared libraries as well as <code>version.txt</code> file in a known install location) for my project. This dependency has no built-in support for CMake <code>find_package()</code>. After reading the <code>find_package()</code> <a href="https://cmake.org/cmake/help/latest/command/find_package.html" rel="nofollow noreferrer">docs</a> and this SO <a href="https://stackoverflow.com/questions/20746936/what-use-is-find-package-if-you-need-to-specify-cmake-module-path-anyway">answer</a>, my understanding is that I should use module mode for <code>find_package()</code>. In the <code>Find*.cmake</code> <code>cmake</code> directory, my guess is that it should:</p>
  
  <ol>
  <li>Setup and verify paths to the header and shared libraries</li>
  <li>Read in the version file</li>
  <li>Define a project using the version file text</li>
  <li>Add an interface library target (<code>${PROJECT_NAME}</code>)</li>
  <li>Add an alias to the interface library using a namespace (<code>${MY_NAMESPACE}</code>)</li>
  <li>Add a library target for each shared library path</li>
  <li>Set the imported path property for each shared library</li>
  <li>Link the shared libraries to the interface library target</li>
  <li>Link the include directory to the interface library target</li>
  <li><code>export(TARGETS ${PROJECT_NAME} NAMESPACE ${MY_NAMESPACE}::)</code></li>
  <li><code>export(PACKAGE ${PROJECT_NAME})</code></li>
  <li>Profit?</li>
  </ol>
  
  <p>Am I doing this right and/or taking the right approach?</p>