[CMake] fixup_bundle: installing multiple executables that depend on the same libraries

Ben Medina ben.medina at gmail.com
Fri Dec 31 15:12:30 EST 2010


That sounds fine for now, thanks.

But what would you do if you had multiple gui apps?

On Fri, Dec 31, 2010 at 11:21 AM, David Cole <david.cole at kitware.com> wrote:
> Another alternative is to put your command line executables into the
> bundle on the Mac, and then they'll be fixed up, too. One caveat is
> that the directory nesting level of the executables should all be the
> same within the bundle so that "@exectuable_path/.." style references
> work from each fixed up executable.
>
> Then you can put just symlinks to those exes anywhere you like that's
> convenient.
>
> It's all sort of roll-your-own, though. There's no other existing
> support to my knowledge...
>
>
>
> On Fri, Dec 31, 2010 at 2:03 PM, Ben Medina <ben.medina at gmail.com> 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
>>
>


More information about the CMake mailing list