• 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
transferring preprocessor macros (or similar) to project dependencies
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

transferring preprocessor macros (or similar) to project dependencies


  • Subject: transferring preprocessor macros (or similar) to project dependencies
  • From: Jessica Kahn <email@hidden>
  • Date: Mon, 12 Jan 2009 17:40:13 -0800

Hi,

I've just joined the list, and so the usual apologies up front if this has been asked a million times. I did a quick search of the archives and didn't find my answer, so...

I've got Parent.xcodeproj, and OtherParent.xcodeproj. Both of these build application targets.

Both of these include a reference to Child.xcodeproj, which builds a loadable bundle that is installed into, and loaded by, the built applications in the two parent projects. This bundle is listed as a direct dependency of the application targets in the application projects.

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?

2) If the answer to #1 is yes, then, how do I do this in a pointy- clicky way that allows my team to open up the Parent.xcodeproj and build, and have things work out the way I want? I guessed that perhaps I could add a shell script phase at the start of the Parent.xcodeproj build, but read that any environment variables set in a shell script phase are scoped to that phase alone... so that doesn't sound like a plausible plan.

Thanks for your help and insight!

--Jess

_______________________________________________
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


  • Follow-Ups:
    • Re: transferring preprocessor macros (or similar) to project dependencies
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Rez settings missing in Project/Target Info panel
  • Next by Date: Re: Rez settings missing in Project/Target Info panel
  • Previous by thread: Re: Rez settings missing in Project/Target Info panel
  • Next by thread: Re: transferring preprocessor macros (or similar) to project dependencies
  • Index(es):
    • Date
    • Thread