<div dir="ltr">Hi Alan, <div><br></div><div>You could look at: <a href="https://github.com/davidsansome/python-cmake-buildsystem" target="_blank">https://github.com/davidsansome/python-cmake-buildsystem</a></div><div><br></div>


<div>More particularly this commit:</div><div>  - Export targets from both the installed and build tree [1] </div><div>  - Add generation of &lt;PROJECT_NAME&gt;Config.cmake [2]</div><div><br></div><div><div>[1] <a href="https://github.com/davidsansome/python-cmake-buildsystem/commit/73134d77881ae6648a8f98daaf8630130b7f54ea" target="_blank">https://github.com/davidsansome/python-cmake-buildsystem/commit/73134d77881ae6648a8f98daaf8630130b7f54ea</a></div>

<div>[2] <a href="https://github.com/davidsansome/python-cmake-buildsystem/commit/3f504d8be5b41086f615494517ddd2cf66f4d365" target="_blank">https://github.com/davidsansome/python-cmake-buildsystem/commit/3f504d8be5b41086f615494517ddd2cf66f4d365</a></div>

</div><div><br></div>
<div>This was based on the explanation of Alexander Neundorf. See <a href="http://www.cmake.org/pipermail/cmake/2013-February/053689.html">http://www.cmake.org/pipermail/cmake/2013-February/053689.html</a></div><div><br>

</div><div style>We should really update the following tutorial: <a href="http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file">http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file</a></div>

<div style><br></div><div style><br></div><div style><br></div><div style>Remark about the &quot;export(PACKAGE ...)&quot; statement:</div><div style><br></div><div style><div>Based on my experience, it turns out that exporting the build tree in the system package registry is a bad idea when building the same package multiple time as it is done on a dashboard client or a developer workstation trying out multiple configurations. Indeed, when &quot;find_package&quot; is used in &quot;CONFIG&quot; (or &quot;NO_MODULE&quot;) mode, by default CMake will search into the CMAKE_SYSTEM_PACKAGE_REGISTRY and will resolve to an already generated build tree instead of the one passed using &lt;PROJECT_NAME&gt;_DIR.</div>

<div><br></div><div><br></div></div><div><br></div><div>Hth</div><div>Jc</div><div><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 28, 2013 at 1:17 PM, Alan W. Irwin <span dir="ltr">&lt;<a href="mailto:irwin@beluga.phys.uvic.ca" target="_blank">irwin@beluga.phys.uvic.ca</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2013-03-28 12:25-0400 David Cole wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
CMake needs no new Find modules.<br>
<br>
All projects should provide a &quot;project config file .cmake script&quot; readable by CMake&#39;s find_package, and installed in a location where CMake can find it, so that a CMake find module is completely unnecessary.<br>


</blockquote>
<br></div>
Hi David:<br>
<br>
Your idea sounds like a good one, but can you recommend an easily understood<br>
project that follows this approach that would serve as a good template<br>
for build-system developers to use when implementing this approach for<br>
their own projects?<br>
<br>
Alan<br>
__________________________<br>
Alan W. Irwin<br>
<br>
Astronomical research affiliation with Department of Physics and Astronomy,<br>
University of Victoria (<a href="http://astrowww.phys.uvic.ca" target="_blank">astrowww.phys.uvic.ca</a>).<br>
<br>
Programming affiliations with the FreeEOS equation-of-state<br>
implementation for stellar interiors (<a href="http://freeeos.sf.net" target="_blank">freeeos.sf.net</a>); the Time<br>
Ephemerides project (<a href="http://timeephem.sf.net" target="_blank">timeephem.sf.net</a>); PLplot scientific plotting<br>
software package (<a href="http://plplot.sf.net" target="_blank">plplot.sf.net</a>); the libLASi project<br>
(<a href="http://unifont.org/lasi" target="_blank">unifont.org/lasi</a>); the Loads of Linux Links project (<a href="http://loll.sf.net" target="_blank">loll.sf.net</a>);<br>
and the Linux Brochure Project (<a href="http://lbproject.sf.net" target="_blank">lbproject.sf.net</a>).<br>
__________________________<br>
<br>
Linux-powered Science<br>
__________________________<div class="HOEnZb"><div class="h5"><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>+1 919 869 8849<br>
</div>