Re: Feature Request: Xcode Needs a "Configure Phase" Scheme
Re: Feature Request: Xcode Needs a "Configure Phase" Scheme
- Subject: Re: Feature Request: Xcode Needs a "Configure Phase" Scheme
- From: Jens Alfke <email@hidden>
- Date: Fri, 02 Dec 2011 09:35:35 -0800
On Dec 2, 2011, at 3:09 AM, Andreas Grosam wrote: Suppose I develop an open source framework "MyFramework" which shall be available for download from some of the source code hosting sites. In order to build this framework I require another open source package, lets name it "ToolKit". This package is publicly available and can be conveniently obtained as well from one of the source code hosting sites. As the developer of the framework "MyFramework" I don't include the "ToolKit package" in the MyFramework sources, rather I tell the users (other developers) to download it themselves. ... Here, the problem is how do I setup the build settings for my project MyFramework? It requires the path to the public headers of ToolKit, the framework or library path and possibly some specific macro definitions in order to compile successfully. However, as the MyFramework developer I don't know this upfront since these settings depend on the individual environment of the user. There are two solutions to this, neither one perfect:
(1) Define a named “Source Tree” in Xcode’s prefs that points to where the framework is checked out, and make the references in your app project relative to that source tree. This then requires that people using your project define the same source tree pointing to where _they_ have the framework checked out. (This is the approach I’ve used in most of my projects so far.)
(2) Use a git submodule (or the Mercurial equivalent). This lets you define in your repository another repo that should be checked out into a subdirectory. Then whoever checks out your project just needs to run “git submodule init” once and git will check out the correct revision of MyFramework. Then the path to the framework is just a known relative path. This is also nice because the repo remembers the exact revision ID of the submodule to check out, so you can be sure that everyone using your project gets the exact same version of MyFramework. The drawbacks are that (1) people have to know to run that init command, and even if you put it in your README some will miss it; and (2) you can end up with multiple checkouts of a project if it’s being used as a submodule by multiple repos.
—Jens |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden