<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 &lt;a.neundorf-work@gmx.net&gt;<br>

To: David Cole &lt;dlrdave@aol.com&gt;<br>

Cc: cmake &lt;cmake@cmake.org&gt;<br>

Sent: Tue, Feb 5, 2013 2:50 pm<br>

Subject: Re: [CMake] When should I use add_subdirectory and when ExternalProject?<br>

<br>









<div id="AOLMsgPart_0_852c4b26-5561-44f2-9405-99be0c1ba1f1" 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 Tuesday 05 February 2013, David Cole wrote:
&gt; -----Original Message-----
&gt; From: Alexander Neundorf &lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;
&gt; To: cmake &lt;<a href="mailto:cmake@cmake.org">cmake@cmake.org</a>&gt;
&gt; Sent: Tue, Feb 5, 2013 1:09 pm
&gt; Subject: Re: [CMake] When should I use add_subdirectory and when
&gt; ExternalProject?
&gt; 
&gt; On Monday 04 February 2013, David Cole wrote:
&gt; &gt; The OpenChemistry project (
&gt; &gt; <a href="https://github.com/OpenChemistry/openchemistry" target="_blank">https://github.com/OpenChemistry/openchemistry</a> ) is a very good example
&gt; &gt; of a SuperBuild project that builds all of its external dependencies via
&gt; &gt; ExternalProject, and then all of its git submodules ("internal
&gt; &gt; dependencies" perhaps ?) also via ExternalProject.
&gt; &gt; 
&gt; &gt; They use CMAKE_PREFIX_PATH both as a place to install all of the built
&gt; &gt; components, and as a place for find_package to find stuff that was built
&gt; &gt; by a previous ExternalProject_Add call.
&gt; &gt; 
&gt; &gt; Study how they do stuff in their CMakeLists files and then get back to us
&gt; &gt; here with more questions.
&gt; 
&gt; one thing I had trouble with is related to the install step.
&gt; 
&gt; With externalProject the install step happens at build time.
&gt; If shared libraries are involved, the install destination should be the
&gt; correct and final install destination, so that the RPATH of using projects
&gt; will point to the correct location.
&gt; This means that at build time I need to have the permissions to write to
&gt; the final install destination (e.g. /opt/), i.e. typically root.
&gt; 
&gt; Is this correct or am I missing something ?
&gt; 
&gt; Alex
&gt; --
&gt; 
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
&gt; 
&gt; Visit other Kitware open-source projects at
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
&gt; 
&gt; Please keep messages on-topic and check the CMake FAQ at:
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a>
&gt; 
&gt; Follow this link to subscribe/unsubscribe:
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a>
&gt; 
&gt; 
&gt; 
&gt; 
&gt; You are correct, but you are coming at it from a Linux-biased perspective.
&gt; 
&gt; For developers on the project, this technique works as-is, in the build
&gt; tree, and in the super-build's install tree, which is in a non-system,
&gt; i.e., user writable location. That's true on all platforms.
&gt; 
&gt; If you are building the openchemistry projects for packaging on a Linux
&gt; box, then you will use all the "system" packages, and not even build them
&gt; as part of the super build. Each one has a flag for whether or not to use
&gt; the system one or to build it.
&gt; 
&gt; For Mac and Windows installers, this technique works well, since all the
&gt; built pieces of the super build are bundled up together as relocatable app
&gt; installations.

How do relative packages actually work on the Mac with install_name ?
Is this always relative ?
I mean, if I have an application and build it against a shared lib, and then 
later on at install time that shared lib is at some other place, the apps 
doesn't find, does it ?
 
Alex
<br>
<br>
<br>
<font size="2"><font face="arial">via Bundle<tt><font size="2"><font face="arial">Utilities and fixup_bundle. Using @exec<tt><font size="2"><font face="arial">utable_path in <tt><font size="2"><font face="arial">bundled <tt><font size="2"><font face="arial">shared libraries...<br>
<br>
<tt><font size="2"><font face="arial">At install t<tt><font size="2"><font face="arial">ime, that lib is going to be inside the app bundle. It is not going to be at some other place.<br>
<br>
</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_852c4b26-5561-44f2-9405-99be0c1ba1f1 -->



</div>

</font></font>