<font color='black' size='2' face='arial'><font color="black" face="arial" size="2">
<div> <br>
</div>
<div> <br>
</div>
<div> <br>
</div>
<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>
From: Alexander Neundorf <a.neundorf-work@gmx.net><br>
To: cmake <cmake@cmake.org><br>
Sent: Tue, Feb 5, 2013 1:09 pm<br>
Subject: Re: [CMake] When should I use add_subdirectory and when ExternalProject?<br>
<br>
<div id="AOLMsgPart_0_4c0ee287-214d-4609-970c-92a5c13853e2" style="margin: 0px;font-family: Tahoma, Verdana, Arial, Sans-Serif;font-size: 12px;color: #000;background-color: #fff;">
<pre style="font-size: 9pt;"><tt>On Monday 04 February 2013, David Cole wrote:
> The OpenChemistry project ( <a __removedlink__1866552146__href="https://github.com/OpenChemistry/openchemistry" target="_blank">https://github.com/OpenChemistry/openchemistry</a>
> ) is a very good example of a SuperBuild project that builds all of its
> external dependencies via ExternalProject, and then all of its git
> submodules ("internal dependencies" perhaps ?) also via ExternalProject.
>
> They use CMAKE_PREFIX_PATH both as a place to install all of the built
> components, and as a place for find_package to find stuff that was built
> by a previous ExternalProject_Add call.
>
> Study how they do stuff in their CMakeLists files and then get back to us
> here with more questions.
one thing I had trouble with is related to the install step.
With externalProject the install step happens at build time.
If shared libraries are involved, the install destination should be the
correct and final install destination, so that the RPATH of using projects
will point to the correct location.
This means that at build time I need to have the permissions to write to the
final install destination (e.g. /opt/), i.e. typically root.
Is this correct or am I missing something ?
Alex
--
Powered by <a __removedlink__1866552146__href="http://www.kitware.com" target="_blank">www.kitware.com</a>
Visit other Kitware open-source projects at <a __removedlink__1866552146__href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a __removedlink__1866552146__href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a __removedlink__1866552146__href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a>
<br>
<br>
<br>
<br>
<font size="2"><font face="arial">You are correct, but you are coming at it from a Linu<tt><font size="2"><font face="arial">x-biased pers<tt><font size="2"><font face="arial">pec<tt><font size="2"><font face="arial">tive.<br>
<br>
<tt><font size="2"><font face="arial">For <tt><font size="2"><font face="arial">developers on th<tt><font size="2"><font face="arial">e project, this technique works as-is, <tt><font size="2"><font face="arial">in the build tree,<br>
<tt><font size="2"><font face="arial">and in the super-build'<tt><font size="2"><font face="arial">s install tree, which is in a non-system, i.e., <tt><font size="2"><font face="arial">user w<tt><font size="2"><font face="arial">ritable<br>
<tt><font size="2"><font face="arial">location. That's true on all platforms.<br>
<br>
</font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt><tt><font size="2"><font face="arial"><tt><font size="2"><font face="arial">If you are building the openchemistry projects for packaging on a Linux box,<br>
then you will use all <tt><font size="2"><font face="arial">the "system" packages, and not <tt><font size="2"><font face="arial">even build them as pa<tt><font size="2"><font face="arial">rt<br>
of the super build. Each one</font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt> has a flag for whether or not to use the system one<br>
<tt><font size="2"><font face="arial">or to build it.<br>
<br>
<tt><font size="2"><font face="arial">For Mac and Windows installers, this <tt><font size="2"><font face="arial">technique <tt><font size="2"><font face="arial">works well, since all the bui<tt><font size="2"><font face="arial">lt<br>
<tt><font size="2"><font face="arial">pieces of the super build are <tt><font size="2"><font face="arial">bundled up together as re<tt><font size="2"><font face="arial">lo<tt><font size="2"><font face="arial">catable app installations.<br>
<br>
<tt><font size="2"><font face="arial">All that said, it's <tt><font size="2"><font face="arial">still evolving, and may <tt><font size="2"><font face="arial">need changes before becoming part of<br>
<tt><font size="2"><font face="arial">any Linux dist<tt><font size="2"><font face="arial">ributions.<br>
<br>
<br>
<tt><font size="2"><font face="arial">Che<tt><font size="2"><font face="arial">ers,<br>
<tt><font size="2"><font face="arial">D<br>
<br>
</font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></font></font></tt></pre>
</div>
<!-- end of AOLMsgPart_0_4c0ee287-214d-4609-970c-92a5c13853e2 -->
</div>
</font></font>