I figured that, but that is one hell of a scary find module... I tend to stay away from it :)<div><br></div><div>Thanks guys.<br clear="all"><div><br></div><div>---------</div>Robert Dailey<br>
<br><br><div class="gmail_quote">On Wed, Dec 14, 2011 at 5:33 PM, Tim Gallagher <span dir="ltr">&lt;<a href="mailto:tim.gallagher@gatech.edu">tim.gallagher@gatech.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Boost takes arguments for versions of the library if you need a concrete example.<br>
<br>
Tim<br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
From: &quot;Alexander Neundorf&quot; &lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;<br>
To: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
Sent: Wednesday, December 14, 2011 5:11:45 PM<br>
Subject: Re: [CMake] Find package with version numbers<br>
<br>
On Wednesday 14 December 2011, Robert Dailey wrote:<br>
&gt; Is there any example of how to write a find module for find_package() that<br>
&gt; utilizes version numbers? How is the version number passed into the<br>
&gt; Find*.cmake module? The documentation on this is very confusing and<br>
&gt; discusses creating a version.cmake file. I looked in the CMake modules<br>
&gt; directory for an example but there are no version files...<br>
&gt;<br>
&gt; I&#39;m creating a find module for the Microsoft Platform SDK:<br>
&gt; FindMSPlatformSDK.cmake. I need to be able to call it like so:<br>
&gt;<br>
&gt; find_package( MSPlatformSDK 7.0 )<br>
<br>
See the readme file in the cmake modules directory.<br>
<br>
In the Find-module, you have access to<br>
&lt;name_of_the_package&gt;_FIND_VERSION_(MAJOR|MINOR|PATCH) etc. variables which<br>
you can check.<br>
<br>
If you determine the version of the found package, you can then simply put the<br>
found version number into a variable, and use the new-style<br>
find_package_handle_standard_args(... VERSION_VAR ...) macro to evaluate it,<br>
it will fail if it is not good.<br>
<br>
For creating a FooConfigVersion.cmake file (when installing your own library),<br>
you may use the WriteBasicConfigVersionFile.cmake (since cmake 2.8.6) which<br>
writes a basic version file for you, which you can install along with your<br>
library.<br>
<br>
Alex<br>
</div></div><span class="HOEnZb"><font color="#888888">--<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/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/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/listinfo/cmake</a><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/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/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/listinfo/cmake</a><br>
</font></span></blockquote></div><br></div>