On Tuesday, August 02, 2011 01:42:47 pm Gregory Crosswhite wrote: > On 8/2/11 9:28 AM, Clinton Stimpson wrote: > > You shouldn't need to copy GetPrerequisites and BundleUtilities. > > > > For Linux you can do: > > set_target_properties( ... PROPERTIES INSTALL_RPATH "\$ORIGIN/../lib") > > > > To get /usr/lib/ to be treated as non-system libraries, you can implement > > gp_resolved_file_type_override() > > to adjust that behavior. > > See gp_item_default_embedded_path() in GetPrerequisites for more > > information. > > > > And finally, to copy the dependents into lib/ instead of bin/, you can > > implement > > gp_item_default_embedded_path_override() > > to return a different path. > > See gp_resolved_file_type() in GetPrerequisites for more information. > > Okay, so that gets me *nearly* everything that I want, but my new > problem is that on Mac OSX fixup_bundle incorrectly assumes that the > bundle directory is where the executable is --- namely, bin/, rather > than the installation directory --- and then complains that the > libraries have not been copied into the bundle; if I instead pass in the > installation directory then it complains because it isn't a ".app" dir. > Thanks to your advice I now know to specifically look for *_override > hooks in the BundleUtilities, but unfortunately unless I am missing > something it looks like there are no such hooks that will let me change > this behavior, so I will need to copy BundleUtilities and then modify > get_dotapp_dir to return the parent of the directory of the executable > rather than the directory of the executable itself. > > Could I request that overrides be added to in BundleUtilities similar to > the ones in GetPrerequisites so that someone facing my situation won't > have to do this in the future? It looks to me though like an override > in get_dotapp_dir might suffice, and I could easily implement that > myself by following the pattern for overrides in GetPrerequisites and > then send you all a patch, but you all have a better sense of the big > picture than a relative newcomer to hacking on CMake like myself so I > would be happy for any feedback you have on this idea. :-) >
On Mac, are you making a .app bundle, or are you doing a layout similar to Linux, with bin/, lib/ layout, or something else? What version of CMake are you using? There was a bug fix in 2.8.5 if not doing a .app bundle on Mac. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
