<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">The goal is simply this:</div>
</div><br>- given:<br> -- an executable target, that happens to be a bundle app on the Mac<br> -- a full path to that bundle in the install tree<br> -- a list of plugins that you have also already installed in the bundle<br>
-- a list of directories where to find libraries that your executables and plugins depend on<br><br>that the following CMake code:<br><br>install(CODE "<br> include(BundleUtilities)<br> fixup_bundle(\"${YOUR_BUNDLE_PATH}\" \"\${YOUR_PLUGINS}\" \"${YOUR_LIBRARY_DIRS}\")<br>
" COMPONENT Runtime)<br><br>will do all the analysis and copying and fixing up of dependent libraries that is mechanically possible...<br><br>So that you do not even have to mention VTK and Qt to your install rules at all.<br>
<br>If you have to say anything about VTK or Qt beyond target_link_libraries, then BundleUtilities is a failure.<br><br><br>David C.<br><br>
</blockquote></div><div><br></div><div>Ok, progress, and more questions:</div><div><br></div>1) I think it worked, <meta http-equiv="content-type" content="text/html; charset=utf-8">check it out.:<br><div><a href="http://www.vtk.org/Wiki/CMake/CPack/BundleUtilities/Examples/Linux/Automatic">http://www.vtk.org/Wiki/CMake/CPack/BundleUtilities/Examples/Linux/Automatic</a></div>
<div><br></div><div>Though the .deb created is 37MB, where when I manually included vtkHybrid.a it was only 2MB...</div><div><br></div><div>2) Do I need both the INSTALL(TARGETS... and INSTALL(CODE... ? Could these be combined into one command? It seems like there is a lot of duplication (I am specifying the executable twice, etc).</div>
<div><br></div><div>3) Is there a way to lose all the $,\, and " in the syntax? That is, change:</div><div><br></div><div>fixup_bundle(\"${APPS}\" \"\${YOUR_PLUGINS}\" \"${YOUR_LIBRARY_DIRS}\")</div>
<div><br></div><div>to:</div><div><br></div><div>fixup_bundle(${APPS} ${YOUR_PLUGINS} ${YOUR_LIBRARY_DIRS})</div><div><br></div><div>That would make it seem much easier to use, even if it really isn't any easier :)</div>
<div><br></div><div><a href="http://www.vtk.org/Wiki/CMake/CPack/BundleUtilities/Examples/Linux/Automatic"></a>4) I'm still not sure what is going on with this business:</div><div><br></div><div><div> BUNDLE DESTINATION . COMPONENT Runtime</div>
<div> RUNTIME DESTINATION bin COMPONENT Runtime</div><div><br></div><div>I think a definition of a "bundle" a "destination", a "component" and "runtime" should be provided here: <a href="http://www.itk.org/Wiki/BundleUtilitiesExample">http://www.itk.org/Wiki/BundleUtilitiesExample</a></div>
<div><br></div><div>5) Why do you have to specify the Library_Dirs? Can't it just use the same list that it uses to look for vtkHybrid when I specify it in the target_link_libraries:</div><div><br></div><div>TARGET_LINK_LIBRARIES(VTKIncludeTest vtkHybrid)</div>
<div><br></div>David</div>