<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:10pt;color:#333399;font-family:Tahoma,Geneva,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks, those pointers helped a lot!</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Matthieu<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Thompson, KT <kgt@lanl.gov><br>
<b>Sent:</b> Thursday, September 27, 2018 3:30:33 PM<br>
<b>To:</b> Dorier, Matthieu; cmake@cmake.org<br>
<b>Subject:</b> RE: How to produce a -config.cmake file</font>
<div> </div>
</div>
<meta content="text/html; charset=Windows-1252">
<meta name="x_Generator" content="Microsoft Word 15 (filtered medium)">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Tahoma}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif}
a:x_link, span.x_MsoHyperlink
{color:#0563C1;
text-decoration:underline}
a:x_visited, span.x_MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}
p
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif}
p.x_msonormal0, li.x_msonormal0, div.x_msonormal0
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif}
span.x_EmailStyle19
{font-family:"Calibri",sans-serif;
color:#1F497D}
.x_MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
{}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Matthieu,</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">I think are asking about the CMakePackageConfigHelpers CMake module (<a href="https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html">https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html</a>)
that defines the macro ‘configure_package_config_file’.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">You can probably find several tutorials or examples by searching github or stackoverflow, etc. for ‘CMakePackageConfigHelpers‘. It is also covered in some
detail in the e-book “Professional CMake” by Craig Scott (requires a purchase). </span>
</p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">-kt</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> CMake <cmake-bounces@cmake.org>
<b>On Behalf Of </b>Dorier, Matthieu<br>
<b>Sent:</b> Thursday, September 27, 2018 2:42 AM<br>
<b>To:</b> cmake@cmake.org<br>
<b>Subject:</b> [CMake] How to produce a -config.cmake file</span></p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<div id="x_divtagdefaultwrapper">
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">Hi,</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399"> </span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">I'm using cmake to build a library (damaris). Once installed, I would like users to be able to find it and its dependencies using find_package(damaris). If I understand correctly,
the way to do that is to have cmake create and install a "damaris-config.cmake" file.</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399"> </span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">Is there a tutorial somewhere on how to do that?</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399"> </span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">Here is some more information:</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">the library depends on
</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">- Boost (using the default FindBoost.cmake installed with cmake)</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">- XercesC (using a custom FindXercesC.cmake located in my source tree)</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">- XSD (using a custom FindXSD.cmake as well)</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">Additionally, it may have been built with the following optional dependencies:</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">- CppUnit (using a custom FindCppUnit.cmake)</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">- HDF5 (using the default FindHDF5.cmake shipped with cmake)</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">- VisIt (using a custom FindVisIt.cmake)</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">- ParaView (relying on the ParaViewConfig.cmake produced when installing ParaView).</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399"> </span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">Thanks,</span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399"> </span></p>
<p><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif; color:#333399">Matthieu</span></p>
</div>
</div>
</div>
</body>
</html>