• 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
Configuring environment variables for Xcode 4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Configuring environment variables for Xcode 4


  • Subject: Configuring environment variables for Xcode 4
  • From: Christopher Trainor <email@hidden>
  • Date: Fri, 10 Jun 2011 19:25:54 +0000
  • Thread-topic: Configuring environment variables for Xcode 4

I am trying to figure out how to set up environment variables to be used by my Xcode projects when compiling and linking.  For example, I would like to set up header search paths and paths to static libraries that are relative to some location defined by an environment variable.

This is easy enough to do by setting up the values in ~/.MacOSX/environment.plist or by setting them up in Xcode preferences.  However, these solutions set the environment variables to the same values for all projects.  I need a more flexible solution.

For example, we might have a branch in source control that needs to link to one version of a library and another branch that needs to link to a newer version.  I am currently just hardcoding the correct paths in the project files themselves.  This addresses our needs, since we can have different versions of the projects (with the appropriate paths hardcoded) checked into the different branches.  However, it can be error prone/time consuming.  If paths need to change, we need to change them in several places in many projects.

It would be great if there were some way of setting just a few environment variables in a file (the workspace file would be ideal) that could be checked into source control along with the rest of the code/projects/etc.

Is anyone aware of a way to accomplish this? 

Thanks,
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

  • Follow-Ups:
    • Re: Configuring environment variables for Xcode 4
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Distributing Xcode 4 Projects
  • Next by Date: Re: Configuring environment variables for Xcode 4
  • Previous by thread: Distributing Xcode 4 Projects
  • Next by thread: Re: Configuring environment variables for Xcode 4
  • Index(es):
    • Date
    • Thread