<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 17 June 2015 at 20:50, Stephen Kelly <span dir="ltr"><<a href="mailto:steveire@gmail.com" target="_blank">steveire@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Klaim - Joël Lamotte wrote:<br>
<br>
</span><span class="">> I didn't realize at all that the FindPackage way is supposed to be<br>
> obsolete now.<br>
<br>
</span>It is not obsolete, but it is not a good approach (since CMake 2.6.0<br>
already) if the upstream uses cmake, because config file packages provide a<br>
better experience for downstreams<br>
<br>
 <a href="http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html" rel="noreferrer" target="_blank">http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html</a><br>
<br>
Even for upstreams that do not use cmake, it is preferable to generate<br>
config file packages for a good downstream experience for cmake users. That<br>
is what Qt qmake and LLVM Makefile buildsystems do. Boost b2 could do it<br>
too:<br>
<br>
 <a href="http://thread.gmane.org/gmane.comp.lib.boost.devel/259011/focus=259445" rel="noreferrer" target="_blank">http://thread.gmane.org/gmane.comp.lib.boost.devel/259011/focus=259445</a></blockquote><div><br></div><div>I remember the discussion but did not realize that it was a tool supposed to be useful </div><div>for any project.</div><div>Thinking about boost, if package files works well with header-only libraries (which I </div><div>suppose it should as long as the boost define header-only targets)</div><div>then it would be very useful indeed.</div><div><br></div><div>By the way, in one of my project I end up using one FindBoost call with all the components</div><div>needed by all the libraries of the project. I do this to avoid having to call FindBoost</div><div>separately for every library with different components (still using the COMPONENTS option</div><div>listing what the whole project needs).</div><div>Then I have to have all my libraries to link with all the boost libraries listed in the boost </div><div>library variable generated by FindBoost.</div><div>If I understand correctly, if FindBoost was supporting imported targets and using "Boost" as a</div><div>namespace (like Qt does), then I could link my libraries to boost libraries in a more </div><div>precise way as I would link each library separately instead of everything FindBoost </div><div>put in the boost libraries variable.</div><div>Is my understanding correct?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<span class=""><br>
> I'm quite surprised actually.<br>
<br>
</span>We prefer not to accept new Find modules into the cmake tree because that<br>
puts the maintenance burden on us, and because it is an inferior user<br>
experience. Some new Find modules still get in, but they need to have a<br>
reason to get in.<br>
<span class=""><br>
> Ok I'll check PackageConfig.cmake for my new and even current projects<br>
> if it can help with managing the tons of libraries I work on.<br>
<br>
</span>Do please let us know how that goes.<br></blockquote><div><br></div><div>I will.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> I will consider providing patches, if I can spend time on this once and<br>
> not bother<br>
> later it would help a lot.<br>
<br>
</span>Documentation here explains how to do that for Find modules:<br>
<br>
 <a href="http://www.cmake.org/cmake/help/v3.2/manual/cmake-developer.7.html#a-sample-find-module" rel="noreferrer" target="_blank">http://www.cmake.org/cmake/help/v3.2/manual/cmake-developer.7.html#a-sample-find-module</a><br>
<br>
Thanks,<br></blockquote><div><br></div><div>Thanks for the pointer.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Steve.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div> </div></div></div></div>