Thanks, I didn&#39;t realize you could execute arbitrary cmake script during installation using install(CODE).  This module makes a lot more sense now.<br><br>Do you know of a way to get the tool to avoid certain libraries?<br>

<br>We depend on another package being installed as a driver component?  The libraries aren&#39;t installed into a default location, so BundleUtilities wants to install it, however the library shouldn&#39;t be bundled with the app.<br>

<br>James<br><br><div class="gmail_quote">On Fri, Feb 26, 2010 at 1:28 PM, Clinton Stimpson <span dir="ltr">&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
<a href="http://www.cmake.org/Wiki/BundleUtilitiesExample" target="_blank">http://www.cmake.org/Wiki/BundleUtilitiesExample</a><br>
I usually use it for 3rd party libraries, but it will also copy libraries from<br>
your build directory if you include your build directory in the list of paths<br>
to search in.<br>
<br>
Clint<br>
<div><div></div><div class="h5"><br>
On Friday 26 February 2010 01:24:30 pm James Bigler wrote:<br>
&gt; How is that?  Could you provide a brief example of which function to call?<br>
&gt; I looked through the code and wasn&#39;t sure what I could call since almost<br>
&gt;  all the copies are done using execute_process which runs at configure<br>
&gt;  time.<br>
&gt;<br>
&gt; James<br>
&gt;<br>
&gt; On Fri, Feb 26, 2010 at 1:12 PM, Clinton Stimpson<br>
&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;wrote:<br>
&gt; &gt; Using BundleUtilities.cmake on each of the bundles should copy that<br>
&gt; &gt; library into each bundle.<br>
&gt; &gt;<br>
&gt; &gt; Clint<br>
&gt; &gt;<br>
&gt; &gt; On Friday 26 February 2010 11:02:12 am James Bigler wrote:<br>
&gt; &gt; &gt; I have a project that builds a group of mac bundles that depend on a<br>
&gt; &gt; &gt;  library I also compile.  I need to install the library within the<br>
&gt; &gt; &gt; bundle to get it to be relocatable, but I have no way of doing this<br>
&gt; &gt; &gt; without creating a circular dependency.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; src/CMakeLists.txt:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; add_subdirectory(mylib)<br>
&gt; &gt; &gt; add_subdirectory(mysamples)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; src/mylib/CMakeLists.txt:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; add_library(mylib mylib.cpp mylib.h)<br>
&gt; &gt; &gt; set_target_properties(mylib PROPERTIES VERSION &quot;2.3.4&quot; SOVERSION &quot;1&quot;)<br>
&gt; &gt; &gt; install(TARGETS mylib RUNTIME DESTINATION bin LIBRARY DESTINATION lib<br>
&gt; &gt; &gt; ARCHIVE DESTINATION lib)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; src/mysamples/CMakeLists.txt:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; foreach(sample fun lessfun)<br>
&gt; &gt; &gt;   add_executable(${sample} ${sample}.cpp MACOSX_BUNDLE)<br>
&gt; &gt; &gt;   target_link_libraries(${sample} mylib)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;   install(TARGETS ${sample} DESTINATION samples)<br>
&gt; &gt; &gt;   # I really want to install mylib in the bundle, but I don&#39;t have<br>
&gt; &gt; &gt; access to the library target anymore.<br>
&gt; &gt; &gt;   install(TARGETS mylib DESTINATION<br>
&gt; &gt; &gt; samples/${sample}.app/Contents/MacOS) endforeach()<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I really want to install my library within the bundle, but I don&#39;t have<br>
&gt; &gt; &gt; access to the library outside of the mylib subdirectory.  I can&#39;t<br>
&gt; &gt; &gt; create install targets in the mylib install directory, because I don&#39;t<br>
&gt; &gt; &gt; have the list of bundles to install it to until after I parse the<br>
&gt; &gt; &gt; mysamples directory and it&#39;s too late.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I tried to use the LOCATION_${CMAKE_BUILD_CONFIG} variable, but because<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m<br>
&gt; &gt;<br>
&gt; &gt; &gt; using the VERSION and SOVERSION properties on my library I only get one<br>
&gt; &gt;<br>
&gt; &gt; of<br>
&gt; &gt;<br>
&gt; &gt; &gt; the symlinks and not all three (libmylib.dylib -&gt; libmylib.2.3.4.dylib,<br>
&gt; &gt; &gt; libmylib.1.dylib -&gt; libmylib.2.3.4.dylib, and libmylib.2.3.4.dylib).<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Is there some way I can get mylib to also install with my executable<br>
&gt; &gt; &gt; bundles?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; James<br>
&gt;<br>
</div></div></blockquote></div><br>