<div dir="ltr">I have a function that makes simpler to implement a find script for simple libraries.<div><br></div><div><pre class="line-pre" style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:16.799999237060547px;width:819px;margin-top:0px;margin-bottom:0px;padding:0px;color:rgb(0,0,0)">

<div class="line" id="file-findexamplemodule-cmake-LC55"><pre class="line-pre" style="font-family:Consolas,'Liberation Mono',Courier,monospace;line-height:16.799999237060547px;width:819px;margin-top:0px;margin-bottom:0px;padding:0px">

<div class="line" id="file-findexamplemodule-cmake-LC55"><span style="color:rgb(0,134,179)">mesh_find_package</span><br class="Apple-interchange-newline"> <span class="p">(</span></div><div class="line" id="file-findexamplemodule-cmake-LC56">

    <span class="s" style="color:rgb(221,17,68)">ExampleModule</span> </div><div class="line" id="file-findexamplemodule-cmake-LC59">    <span class="s" style="color:rgb(221,17,68)">MODULE_PRETTY_NAME</span> <span class="s2" style="color:rgb(221,17,68)">"Example Module - for demonstration purposes only"</span></div>

<div class="line" id="file-findexamplemodule-cmake-LC60">    <span class="s" style="color:rgb(221,17,68)">INCLUDE_SEARCH_FILE</span> <span class="s" style="color:rgb(221,17,68)">ExampleModule/ExampleClass.hpp</span></div>

<div class="line" id="file-findexamplemodule-cmake-LC61">    <span class="s" style="color:rgb(221,17,68)">INCLUDE_PATH_HINTS</span> <b>/usr/local/include /opt/local/include</b></div><div class="line" id="file-findexamplemodule-cmake-LC62">

    <span class="s" style="color:rgb(221,17,68)">MODULE_LIBRARIES</span> <span class="s" style="color:rgb(221,17,68)">ExampleModule</span> <span class="c" style="color:rgb(153,153,136);font-style:italic"># this is the name of the ExampleModule library file without a prefix or extension</span></div>

<div class="line" id="file-findexamplemodule-cmake-LC63">    <span class="s" style="color:rgb(221,17,68)">LIBRARY_PATH_HINTS</span> <span class="o" style="font-weight:bold">/usr/local/lib /opt/local/lib</span></div><div class="line" id="file-findexamplemodule-cmake-LC64">

    <span class="c" style="color:rgb(153,153,136);font-style:italic">#DEBUG # uncomment this for extra debug info about searching for the module files</span></div><div class="line" id="file-findexamplemodule-cmake-LC65">
  <span class="p">)</span></div>
<div class="line" id="file-findexamplemodule-cmake-LC66"> </div></pre></div></pre><div>I've included the script and a more complete example below:</div><div><ul><li><a href="https://gist.github.com/ahundt/8584263">https://gist.github.com/ahundt/8584263</a><br>

</li></ul><div><div><br></div><div>The function would need to be cleaned up and renamed, perhaps to something like:</div><div><ul><li>find_package_library_script()<br></li><li>implement_find_script()</li></ul></div><div>
    </div>
<div>It would be great if a function like this could be added to CMake because implementing most find scripts would become much easier. </div><div><br></div><div>Is there any interest in this functionality?</div><div><br>

</div>Cheers!<div>Andrew Hundt</div></div>
</div></div></div>