• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem when inheriting settings in xcconfig files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem when inheriting settings in xcconfig files


  • Subject: Re: Problem when inheriting settings in xcconfig files
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 12 Dec 2007 02:09:30 -0800

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

_______________________________________________

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


References: 
 >Problem when inheriting settings in xcconfig files (From: Mattias Arrelid <email@hidden>)

  • Prev by Date: Re: Notification for Idle Time?
  • Next by Date: String parsing advice...
  • Previous by thread: Re: Problem when inheriting settings in xcconfig files
  • Next by thread: Indexed Accessors vs. Data Sources
  • Index(es):
    • Date
    • Thread