<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 5, 2018 at 8:09 AM, Alexander Neundorf <span dir="ltr"><<a href="mailto:a.neundorf-work@gmx.net" target="_blank">a.neundorf-work@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2018 M01 4, Thu 05:09:54 CET Dave Milter wrote:<br>><br>
> c)Include this project as git submodule and use add_subdirectory(libfoo)<br>
<br>
the "parent" project will/can influence the behaviour of libfoo then, I would<br>
not recommend this.<br></blockquote></div><div><br></div><div>It depends on the situation, sometimes you explicitly want this. An advantage of this approach is that libfoo will then be built with the same set of flags as the main build (apart from those flags it modifies itself). It also plays nicely with IDE projects because they will typically see all the sources of libfoo as well as the main project. You can also end up building just the targets from libfoo that you need instead of building everything as you would if it was external. The new <a href="https://cmake.org/cmake/help/git-master/module/FetchContent.html">FetchContent</a> module (on master, not yet in a public release) makes this approach particularly easy.</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div></div>