From the Xcode menu on top, click preferences, select the locations tab, look at the build location option.
You have 2 options:
- Place build products in derived data location (recommended)
- Place build products in locations specified by targets
Update:
On xcode 4.6.2 you need to click the advanced button on the right side below the derived data text field. Build Location select legacy.