title: Have XCode set the @executable_path where to look for a dylib automatically
body: <p>I build my OSX application using XCode 5.1.1 and link to a .dylib.
  I've set up Build Phases -> Copy Files to copy the .dylib in the Frameworks destination.</p>
  
  <p>When I launch from XCode it works fine, but when I double-click launch the .app bundle from Finder, it complains it cannot find the dylib, which XCode has dutifully placed under Contents/Frameworks, which can be easily verified in finder.</p>
  
  <p>otool -L on my executable reveals that it is looking for </p>
  
  <pre><code>@loader_path/libXYZ.dylib (compatibility version 1.0.0, current version 1.0.0)
  </code></pre>
  
  <p>I can hack around this easily by using install_name_tool on my executable as follows:</p>
  
  <pre><code>install_name_tool -change @loader_path/libXYZ.dylib @executable_path/../Frameworks/libXYZ.dylib  my_exec
  </code></pre>
  
  <p>but that change is lost on each re-build obviously. How can I tell XCode to set up the @executable_path../Frameworks in the first place?</p>