Re: transferring preprocessor macros (or similar) to project dependencies
Re: transferring preprocessor macros (or similar) to project dependencies
- Subject: Re: transferring preprocessor macros (or similar) to project dependencies
- From: Ken Thomases <email@hidden>
- Date: Mon, 12 Jan 2009 23:25:53 -0600
On Jan 12, 2009, at 7:40 PM, Jessica Kahn wrote:
I'd like to conditionally compile sources during the bundle build,
based on settings that are unique to each application build. Ideally
it'd be something like being able to set a preprocessor macro
"FEATURE_FOO_ENABLED=1" in one of the application projects, and have
that macro definition carried through to, and used during, the build
of the loadable bundle in Child.xcodeproj.
Did some reading, and ended up finding that I may need to do this by
setting environment variables during the build. Apparently the scope
of the environment is the one that will apply to both the
Parent.xcodeprojs and the Child.xcodeproj, both.
My questions:
1) Is this the right direction to be taking? Is the environment the
place to set these settings?
I would say no. When you think about it, having FEATURE_FOO_ENABLED
or not produces two distinct variations of the bundle. These two
variations should be represented by two build configurations in the
child project.
Then, one parent project would use one of the configurations and the
other would use the other configuration. Xcode will use a
configuration when building the bundle which is named the same as the
parent project's configuration, if it finds one.
Cheers,
Ken
_______________________________________________
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