&lt;snip&gt;<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
&gt; There will never be an easy way to pull external projects directly into a<br>
&gt; calling project because the external things are not even guaranteed to be on<br>
&gt; disk yet at configure time of said calling project.<br>
<br>
<br>
</div>Yeah, kind of a chicken-egg problem...<br></blockquote><div><br></div></div>
<div>Exactly. That&#39;s why we didn&#39;t try to solve that problem. If you have a chicken-egg problem to solve, you have to choose starting with a chicken or an egg, thereby alienating approximately 50% of your audience, even if you have good reasons for your choice.</div>
</div></blockquote><div>&lt;snip&gt;<br><br>I like cake.  I like eating it too.  Mmmm cake!  Cmake may not *know where the third party is when it configures*, but it *knows where it will be*.  The build will/could take care of the rest. Correct?  The 50% rule is how Bush won the election (alienating half the audience - through Karl Rove tactics)... we all know how that turned out :-) (this is a joke - and is meant as such - don&#39;t read too much into it but has a half/50% serious part)<br>
<br> &lt;snip&gt;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div></div><div>So: there is one approach that&#39;s sort of a hybrid here, that I&#39;ll mention because it might be useful to consider.</div>
<div><br></div><div>You could have a cmake option in your project that builds your project one of two ways: &quot;as usual&quot; or as the final link in a chain of ExternalProject_Add calls. I&#39;ve done this and I know it works, but it&#39;s proprietary and I cannot point you to the source code. This technique, however, does make things hard to think about at times...</div>

<div><br></div><div>Something like this in CMakeLists.txt:</div><div>==================================================</div><div>option(MYPROJ_UBERBUILD &quot;If ON, build all prereqs first, then build me...&quot; ON)</div>

<div>if(uberbuild)</div><div>  include(BuildAllViaExternalProject.cmake)</div><div>else()</div><div>  include(BuildJustMe.cmake)</div><div>endif()</div><div><br></div><div>And as the last thing inside BuildAllViaExternalProject.cmake:<br>

</div><div>==================================================</div><div>ExternalProject_Add(</div><div>  DOWNLOAD_COMMAND &quot;&quot;</div><div>  CMAKE_ARGS</div><div>    -DMYPROJ_UBERBUILD:BOOL=OFF</div><div>  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}</div>

<div>  ...</div><div>)</div><div><br></div><div><br></div><div>The net effect is that a project can build itself as an ExternalProject with the &quot;clever (?)&quot; use of a CMake option....</div><br>
</div></blockquote></div>&lt;snip&gt;<br><br>Thank you,I will be looking into ExternalProject_Add and will keep this in mind while creating my build tree. <br><br>Brian<br>