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