Re: Integrating with another app
Re: Integrating with another app
- Subject: Re: Integrating with another app
- From: Graham Cox <email@hidden>
- Date: Wed, 15 Jul 2009 18:01:24 +1000
On 15/07/2009, at 5:41 PM, Anthony Smith wrote:
What's the best way to include an external app's source into and
Xcode project? The app I'm using is cross platform, open source,
programmed in C and uses a makefile to build. Any suggestions?
There's probably no one "best" way, but you have several choices.
Bear in mind that 'app' really refers to the packaging of code, rather
than the code itself. You'll need to repackage it to use as part of
another app. Typical ways would be as a statically linked library or
as a dynamically linked library or framework.
I'd build the external app in a separate Xcode project so that you can
work out the kinks of doing so in isolation. Then, when it's building
cleanly, add the entire project to your derivative project and set up
dependencies so that the first gets built, generates its products
which are then included in the second, which then builds, linking to
the library the first one built. This sounds a bit convoluted but it's
quite straightforward.
Alternatively if the source is just a few files this might be overkill
- you could just add the files directly to your source. However most
open source projects I've come across seem to have extended chains of
dependencies which make this approach unattractive, as you'll end up
dragging in hundreds of other files just to get it to compile. Doing
that in a separate project makes managing that part of the code a lot
easier, I've found.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden