Xcodebuild failing to pick up environment values from project file?

Posted by egrunin on Stack Overflow See other posts from Stack Overflow or by egrunin
Published on 2011-12-29T20:39:17Z Indexed on 2012/05/31 4:40 UTC
Read the original article Hit count: 242

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about xcode

Related posts about xcodebuild