<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><pre><div class="line" id="LC38"><span class="nb">Hi, <br>I have CMakeLists.txt with several external projects included:<br></span><br><pre><span class="p">&lt;...&gt;</span></pre><span class="nb">EXTERNALPROJECT_ADD</span><span class="p">(</span></div><div class="line" id="LC39">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">bzip2</span></div><div class="line" id="LC40">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">URL</span> <span class="s">http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz</span></div><div class="line" id="LC41">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">CONFIGURE_COMMAND</span> <span class="s2">""</span></div><div class="line" id="LC42">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">BUILD_COMMAND</span> <span class="s">make</span> <span class="s">PREFIX=</span><span class="o">${</span><span class="nv">CMAKE_BINARY_DIR</span><span class="o">}</span> <span class="s">SHARED=</span> <span class="s">XCFLAGS=-I</span><span class="o">${</span><span class="nv">CMAKE_BINARY_DIR</span><span class="o">}</span><span class="s">/include</span> <span class="s">XLDFLAGS=-L</span><span class="o">${</span><span class="nv">CMAKE_BINARY_DIR</span><span class="o">}</span><span class="s">/lib</span> <span class="s">XLIBS=-ldl</span></div><div class="line" id="LC43">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">INSTALL_COMMAND</span> <span class="s">make</span> <span class="s">install</span> <span class="s">PREFIX=</span><span class="o">${</span><span class="nv">CMAKE_BINARY_DIR</span><span class="o">}</span> <span class="s">SHARED=</span></div><div class="line" id="LC44">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">BUILD_IN_SOURCE</span> <span class="s">1</span></div><div class="line" id="LC45"><span class="p">)</span></div><div class="line" id="LC46"><br></div><span class="nb">EXTERNALPROJECT_ADD</span><span class="p">(</span><div class="line" id="LC55">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">expat</span></div><div class="line" id="LC56">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">URL</span> <span class="s">http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz</span></div><div class="line" id="LC57">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">CONFIGURE_COMMAND</span> <span class="s">./configure</span> <span class="s">--prefix=</span><span class="o">${</span><span class="nv">CMAKE_BINARY_DIR</span><span class="o">}</span> <span class="s">--disable-shared</span> <span class="s">--enable-static</span></div><div class="line" id="LC58">&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">BUILD_IN_SOURCE</span> <span class="s">1</span></div><div class="line" id="LC59"><span class="p">)<br><br>&lt;...&gt;<br><br>What I want to achieve is two step build process:<br>1) First command should perform download and patch steps only<br>2) Then I want to move prepared source tree to other machine and complete build with second command. Second machine is strictly off-line (for security reasons).<br><br></span><pre><span class="nb">Can you help me with implementing such scenario?</span></pre></div></pre>                                               </div></body>
</html>