<div class="gmail_quote">On Wed, Apr 20, 2011 at 11:38 AM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
___________________________________________________________<br>
<div class="im">Mike Jackson <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
</div><div class="im">Principal Software Engineer <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software Dayton, Ohio<br>
<br>
</div><div class="im">On Apr 20, 2011, at 11:25 AM, David Cole wrote:<br>
<br>
> On Wed, Apr 20, 2011 at 11:17 AM, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>> wrote:<br>
> On Apr 20, 2011, at 10:55 AM, David Cole wrote:<br>
><br>
> ><br>
> > What is wrong with that one ?<br>
> ><br>
> > Nothing is wrong with it, but there is no link from the app to the plugin, so fixup_bundle cannot determine that it's necessary and automatically pull it in. The plugin, from the app's point of view, is something that may or may not exist, and if it does, it's dynamically loaded. So you need to install it into the bundle first, and then you need to tell fixup_bundle about it so that it gets included in the set of fixed up libraries.<br>
> ><br>
> > Hope this helps,<br>
> > David<br>
><br>
> Is that the part that changed from CMake 2.8.3 to 2.8.4? I am using CMake 2.8.3 and all my code works fine but I don't think I explicitly "install" the plugin but rather list it (the absolute path to the built plugin) as an argument to the "fixup_bundle" function. Will that scheme still work under CMake 2.8.4?<br>
><br>
> There are some other issues with CMake 2.8.4 with BundleUtilities and my code which is why I have not updated from 2.8.3<br>
><br>
> Mike Jackson<br>
> <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
><br>
><br>
><br>
</div><div class="im">> In CMake 2.8.3 and earlier, libs listed in the 2nd arg to fixup_bundle were copied into the bundle. Half the people using it considered that behavior a bug, half liked it just fine.<br>
><br>
> In 2.8.4, we "fixed" the bug (really, transferred it to the other half of the people)...<br>
><br>
> In retrospect, I never should have allowed that change to go into CMake, but there you have it: 2.8.3 and earlier copy the plugins, 2.8.4 and later do not.<br>
><br>
> So: if you want a plugin inside your bundle, with CMake 2.8.4 and later, you have to copy/install the plugin into the bundle yourself before calling fixup_bundle.<br>
><br>
><br>
> Sorry for the persisting confusion,<br>
> David<br>
><br>
<br>
</div>So I should probably put the copy step into my configured cmake file that runs the 'fixup_bundle'? I guess an install rule with the proper path inside the app bundle should work. Isn't there an easier way? BUNDLE DESTINATION argument to the INSTALL(target.. ) should do it also correct?<br>
<br>
Thanks<br>
Mike Jackson<br>
<div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>I would recommend something like this (top of my head, not actually building from this):<br><br> install( TARGETS myapp BUNDLE DESTINATION . )<br><br>That should produce a directory structure in CMAKE_INSTALL_PREFIX like so:<br>
<br> ./myapp.app/Contents/MacOS/myapp<br><br>Then for the plugin, something like:<br><br> install( TARGETS plugin DESTINATION myapp.app/Contents/plugins )<br><br>Which should yield:<br><br> ./myapp.app/Contents/MacOS/myapp<br>
./myapp.app/Contents/plugins/libplugin.dylib<br><br>Something along those lines. And then pass the full path to libplugin.dylib to fixup_bundle.<br><br>