Xcodebuild failing to pick up environment values from project file?
- by egrunin
I'm using Xcode 3.2.6, MacOSX.
I have a globally visible environment setting:
ICU_SRC=~/Documents/icu/source
This really is an environment setting, it's set at login time. When I open up Terminal, it's there.
In my project, under Header Search Paths I've added this:
$(ICU_SRC)/i18n
$(ICU_SRC)/common
These expand correctly when I compile inside the IDE. When I look at the build results, I see this:
-I/Users/eric.grunin/Documents/icu/source/i18n
-I/Users/eric.grunin/Documents/icu/source/common
When I build from the command line, however, it fails. What I see is this:
-I/i18n
-I/common
Here's the command I'm using to compile:
/usr/bin/env -i xcodebuild -project my_project.xcodeproj -target
"my_program" -configuration Release -sdk macosx10.6 build
What am I doing wrong?
Edited to add:
Apple explains Setting environment variables for user processes