<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I was just noticing that the find_package command documentation talks about how, in &#8220;Config&#8221; mode, &nbsp;the PACKAGE_FIND_* variables are defined for use by the &#8220;&lt;config-file&gt;-version.cmake&#8221; or &#8220;&lt;config-file&gt;Version.cmake&#8221; scripts for libraries.&nbsp; It further mentions that when find_package is used in &#8220;Module&#8221; mode that the &#8220;Find&lt;package&gt;.cmake&#8221; script is responsible for verifying the version.&nbsp; However, it doesn&#8217;t seem to document that the version variables are defined for &#8220;Module&#8221; mode as &lt;package&gt;_FIND_*, e.g. PACKAGE_FIND_VERSION for a package name FooBar would be passed to the FindFooBar.cmake as FooBar_FIND_VERSION, and so on.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>(I have not dealt with &#8220;Config&#8221; mode for find_package, so perhaps I&#8217;m mistaken about the naming there.)<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Anyway, I think the documentation should be updated to reflect those variables, and I&#8217;d be happy to do that, so long as I am not missing this being documented elsewhere.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Am I correct in this point?&nbsp; For that matter, can someone tell me if in the above example the &#8220;FooBar-version.cmake&#8221; would be passed PACKAGE_FIND_VERSION and set PACKAGE_VERSION or would it be passed FooBar_FIND_VERSION and set FooBar_VERSION?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Reference: <a href="http://cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package">http://cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package</a><o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Incidentally, this appears to be slightly different than the XXX_VERSION_STRING being set by Modules, documented in the Modules/readme.txt (Reference: <a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/readme.txt">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/readme.txt</a>).&nbsp; <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>-----------------------------8&lt;-----------------------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal>On a side note, it might be nice to update that document to use the same &lt;package&gt; naming convention (possibly as &lt;module&gt;) as the main documentation does, like:<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>For more information about how to contribute modules to CMake, see this page:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>http://www.itk.org/Wiki/CMake:Module_Maintainers<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>Note to authors of Find&lt;module&gt;.cmake files<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>We would like all Find&lt;module&gt;.cmake files to produce consistent variable names.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>Please use the following consistent variable names for general use.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_INCLUDE_DIRS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The final set of include directories listed in one variable for use by client code.&nbsp; This should not be a cache entry.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_LIBRARIES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The libraries to link against to use &lt;module&gt;. These should include full paths.&nbsp; This should not be a cache entry.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_DEFINITIONS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Definitions to use when compiling code that uses &lt;module&gt;. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include &lt;jpeg.h&gt;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_EXECUTABLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Where to find the &lt;module&gt; tool.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_&lt;tool&gt;_EXECUTABLE&nbsp;&nbsp; Where to find the &lt;tool&gt; tool that comes with &lt;module&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_LIBRARY_DIRS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Optionally, the final set of library directories listed in one variable for use by client code.&nbsp; This should not be a cache entry.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_ROOT_DIR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Where to find the base directory of &lt;module&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_VERSION_&lt;version&gt;&nbsp;&nbsp; Expect Version &lt;version&gt; if true. Make sure at most one of these is ever true.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_WRAP_&lt;command&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If False, do not try to use the relevent CMake wrapping command.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_&lt;sub part&gt;_FOUND&nbsp;&nbsp;&nbsp; If False, optional &lt;sub part&gt; of &lt;module&gt; system is not available.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_FOUND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set to false, or undefined, if we haven't found, or don't want to use &lt;module&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This should not be a cache entry.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_VERSION_STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A human-readable string containing the version of the package found, if any.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_VERSION_MAJOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The major version of the package found, if any.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_VERSION_MINOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The minor version of the package found, if any.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_VERSION_PATCH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The patch version of the package found, if any.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>You do not have to provide all of the above variables. You should provide &lt;module&gt;_FOUND under most circumstances. If &lt;module&gt; is a library, then&nbsp; &lt;module&gt;_LIBRARIES, should also be defined, and &lt;module&gt;_INCLUDE_DIRS should usually be defined (I guess libm.a might be an exception)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>The following names should not usually be used in CMakeLists.txt files, but they may be usefully modified in users' CMake Caches to control stuff.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_LIBRARY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of &lt;module&gt; Library. A User may set this and &lt;module&gt;_INCLUDE_DIR to ignore to force non-use of &lt;module&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_&lt;sub_lib&gt;_LIBRARY&nbsp;&nbsp; Name of &lt;sub_lib&gt; library that is part of the &lt;module&gt; system. It may or may not be required to use &lt;module&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_INCLUDE_DIR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Where to find xxx.h, etc.&nbsp; (&lt;module&gt;_INCLUDE_PATH was considered bad because a path includes an actual filename.)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:Consolas'>&lt;module&gt;_&lt;part&gt;_INCLUDE_DIR&nbsp; Where to find xxx_&lt;part&gt;.h, etc.<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div style='border:none;border-top:dotted silver 1.0pt;padding:4.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#666666'>Aaron Meadows</span></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#666666'><br>Software Engineer<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:9.0pt;margin-right:0in;margin-bottom:9.0pt;margin-left:0in'><b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#F57F20'>Thomson Reuters<o:p></o:p></span></b></p></div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#666666'>Phone: 314.468.3530<br>Mobile: 636.541.6139<br>aaron.meadows@thomsonreuters.com<br>thomsonreuters.com</span><o:p></o:p></p></div></body></html>