Re: Can I pass some value to a sub-project?
Re: Can I pass some value to a sub-project?
- Subject: Re: Can I pass some value to a sub-project?
- From: Rush Manbert <email@hidden>
- Date: Thu, 24 Feb 2011 10:21:27 -0800
On Feb 24, 2011, at 7:54 AM, David Hoerl wrote:
> I have an Xcode project that includes a subproject (which builds a static library for the iPhone).
>
> I would dearly love the ability to pass a compile time flag (ie -D"FOO") but have had no luck. User-defined settings don't get passed along nor do the C Flags.
>
> Is there a way to do this?
>
The only way I know of to do this is to use xcodebuild, which allows you to specify build settings that are used by the target you build AND all dependent targets. But doing this is not simple. You either need to always build from a script, or you need to make a proxy External Target that runs a script that uses xcodebuild to build the real target. I can attest from my own experience that this works, but it's complicated to set up and use.
If what you really need is a common set of user defined build settings, then you should look into using Xcode configuration files to configure your projects. Again, I know from experience that you can do a whole lot of interesting things with xcconfig files.
- Rush
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