title: Xcode 4 : define a preprocessor macro in a dependent target
body: <p>I have an app named <em>MyApp</em> which is linked to a static library <em>MyLibrary</em>
  I've added the <em>MyLibrary</em> project to Xcode and added the <em>MyLibrary</em> target to <em>MyApp</em>'s target dependencies.
  All this works fine, I can set breakpoints, and I'm pretty happy.</p>
  
  <p>The thing is that I want a conditional log in the library :</p>
  
  <pre><code>#ifdef DEBUG
  #   define  MYDebug(msg, ...) NSLog(@"\nDEBUG -&gt; %@ \n(%s:%d)",[NSString stringWithFormat:msg, ## __VA_ARGS__], __PRETTY_FUNCTION__,__LINE__);
  #else
  #   define MYDebug(msg, ...)
  #endif
  </code></pre>
  
  <p>So I have two build configuration for my library :
  - <strong>Debug</strong> has "DEBUG=1" in the target's build settings in "preprocessor macros"
  - <strong>Prod</strong> has nothing</p>
  
  <p>And the <em>MyLibrary</em> target is set to build with the Debug build configuration.</p>
  
  <p>This works fine if I build the static library (.a), and include it in a project.
  But if it is built by target dependency, it seems that DEBUG is not defined (MYDebug doesn't log anything).</p>
  
  <p>I've also tried to set DEBUG=1 in <em>MyApp</em>'s build settings, but it doesn't work.</p>
  
  <p>Is there something I missed, or another way to do it ?</p>