Re: Problem when inheriting settings in xcconfig files
Re: Problem when inheriting settings in xcconfig files
- Subject: Re: Problem when inheriting settings in xcconfig files
- From: "Mattias Arrelid" <email@hidden>
- Date: Fri, 18 Jan 2008 22:44:06 +0100
On 12/12/07, Chris Hanson <email@hidden> wrote:
> On Dec 11, 2007, at 4:49 AM, Mattias Arrelid wrote:
>
> > I have a project which defines the build and target settings through
> > xcconfig files. Now, I would like to define other linker flags in
> > the top level root xcconfig file, and re-use these in other xcconfig
> > files that includes this xcconfig file. Like...
>
> This is an Xcode question and thus would be best asked on the xcode-
> users list. Thanks.
>
> > root.xcconfig:
> > OTHER_LDFLAGS = -framework Carbon
> >
> > using_root_as_base.xcconfig:
> >
> > #include "root.xcconfig"
> > OTHER_LDFLAGS = -framework Cocoa $(OTHER_LDFLAGS)
> >
> > Why doesn't the above work as expected?
>
> Because each included xcconfig file doesn't define a "level" of
> configuration. In other words, the #include directive is text-
> substitution just as it is in C, not file-referencing. So your
> using_root_as_base.xcconfig is exactly equivalent to the following text:
>
> OTHER_LDFLAGS = -framework Carbon
> OTHER_LDFLAGS = -framework Cocoa $(OTHER_LDFLAGS)
>
> This defines OTHER_LDFLAGS, and then defines OTHER_LDFLAGS *again* to
> reference the value at the next level of the build settings stack. It
> doesn't define two levels of build settings stack.
>
> -- Chris
That seems reasonable. And thanks for pointing me in the xcode-users
mailing list direction (never thought of such a list, how clumsy of
me).
Regards
Mattias
_______________________________________________
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