Re: Conditional include in Build ResourceManager Resources?
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