I ended up creating a variation on fixup_bundle for command line tools on OS X. It basically copies the app into "bin/" and depended libraries into "lib/" and then runs install_name_tool on the executables to make them find the libraries in "lib/".
You can find examples of the cmake code and configurable shell scripts here: http://scm.bluequartz.net/support-libraries/cmp/trees/master/OSX_Tools _________________________________________________________ Mike Jackson [email protected] BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Fri, Dec 31, 2010 at 2:03 PM, Ben Medina <[email protected]> wrote: > Hello all, > > My project is sprouting new executables, and the simple use case of > using fixup_bundle is no longer sufficient. At the moment, I have: > 1. A Qt-based gui application. > 2. A command line application. > > Both of these apps share common 3rdparty library dependencies (boost, > Qt, etc.). And I anticipate several more apps in the near future, both > gui and command line. > > Simply running fixup_bundle on each app works fine on Windows and > Linux; the executables both end up in the bin directory, and all their > dependent libs get copied there as well. However, on the Mac, things > are more complicated. My GUI app is built as a bundle, so fixup_bundle > copies all dependent libs into the bundle. But the command line app is > dependent on some of those same libs, and I don't want duplicate > copies of them in my installation. > > So I'm wondering what the best path forward is. Ultimately, I think I > should be doing something like this: > 1. Install all the common 3rdparty library dependencies somewhere out > in /Library/Application Support. > 2. Install small wrapper scripts for both apps that set > DYLD_LIBRARY_PATH to point to where the 3rdparty libs are installed, > then launch the app. > > Does this sound reasonable? Is it possible with CMake/CPack? If so, > are there any examples of how to do this? > > Thanks, > Ben > _______________________________________________ > 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 > _______________________________________________ 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
