Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>According to <a href="http://developer.apple.com/documentation/developertools/Conceptual/XcodeBuildSystem/300-Build_Settings/bs_build_settings.html#//apple_ref/doc/uid/TP40002691-SW5" rel="noreferrer">Apple's Docs</a>, you are able to provide a default for any build setting using an <a href="http://developer.apple.com/qa/qa2001/qa1067.html" rel="noreferrer">environment variable</a>. </p> <p>In this case, you'd want to set <code>HEADER_SEARCH_PATHS</code>. For some reason I don't understand, this doesn't work. It works fine for other build settings (for example, OTHER_CFLAGS), but not for <code>HEADER_SEARCH_PATHS</code>. You can see what the variable name for any setting is by opening the research assistant in the build settings window (book button on the bottom left.)</p> <p>One var that does work is <code>USER_HEADER_SEARCH_PATHS</code>, which is just like what you want, but only works for paths in double quotes (not in angle brackets.)</p> <p>So</p> <pre><code>#include "bar.h" </code></pre> <p>would work, but</p> <pre><code>#include &lt;bar.h&gt; </code></pre> <p>wouldn't.</p> <p>The build settings plist referenced from the above article on environment variables should end up looking something like this:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;USER_HEADER_SEARCH_PATHS&lt;/key&gt; &lt;string&gt;~/test&lt;/string&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> <p>Hope that helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload