• 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: Conditional include in Build ResourceManager Resources?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conditional include in Build ResourceManager Resources?


  • Subject: Re: Conditional include in Build ResourceManager Resources?
  • From: Chris Espinosa <email@hidden>
  • Date: Wed, 22 Mar 2006 19:42:58 -0800


On Mar 22, 2006, at 4:28 PM, Aaron Hipple wrote:

I am trying to conditionally include a different resource file for Debug and Release build configurations of the same target in Xcode 2.2.  It appears to me that the *.r files sent to Rez do not get preprocessed by the projects build settings.  Is there a way to pass those build settings to the *.r file first?


Build settings are not "preprocessed."  If you want to pass a build setting to Rez, you add something to the Rez Preprocessor Definitions like

CURRENT_CONFIG=$(CONFIGURATION)

This passes the value of the $(CONFIGURATION) build setting in the CURRENT_CONFIG preprocessor macro.  You do this for every build setting you may want to pass.

In reality, because string comparisons in preprocessor #if statements are generally ineffective, you really want to take a different approach:  you probably want to pass different preprocessor macros in different configurations.  For example, in your Debug config you'd set

REZ_DEBUG=1

and then in your .r file you'd just do #ifdef REZ_DEBUG around your #include.

Chris
 _______________________________________________
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

References: 
 >Conditional include in Build ResourceManager Resources? (From: Aaron Hipple <email@hidden>)

  • Prev by Date: Re: Strip and universal binaries
  • Next by Date: Re: Creating an umbrella framework
  • Previous by thread: Conditional include in Build ResourceManager Resources?
  • Next by thread: Strip and universal binaries
  • Index(es):
    • Date
    • Thread