How is that? Could you provide a brief example of which function to call? I looked through the code and wasn't sure what I could call since almost all the copies are done using execute_process which runs at configure time.<br>
<br>James<br><br><div class="gmail_quote">On Fri, Feb 26, 2010 at 1:12 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>
Using BundleUtilities.cmake on each of the bundles should copy that library<br>
into each bundle.<br>
<br>
Clint<br>
<div><div></div><div class="h5"><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 bundle<br>
> to get it to be relocatable, but I have no way of doing this without<br>
> 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 access<br>
> to the library target anymore.<br>
> install(TARGETS mylib DESTINATION samples/${sample}.app/Contents/MacOS)<br>
> 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 create<br>
> install targets in the mylib install directory, because I don't have the<br>
> list of bundles to install it to until after I parse the mysamples<br>
> directory and it's too late.<br>
><br>
> I tried to use the LOCATION_${CMAKE_BUILD_CONFIG} variable, but because I'm<br>
> using the VERSION and SOVERSION properties on my library I only get one of<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>