jspahrsummers/xcconfigs — pull request #3 by rastersize (2013-01-14 21:03:09+00:00)
Title: Use rpath for OS X frameworks and applications

This pull request changes the OS X framework and application configs to use `@rpath` instead of `@executable_path`. The reasons for this is that when using `@rpath`, frameworks can be included from wherever they may be placed (e.g. `The.app/Contents/Frameworks` or `/System/Frameworks`). Given that the path is included in the application’s `LD_RUNPATH_SEARCH_PATHS` linker flag (it can have multiple values). This pull request also sets the application’s `LD_RUNPATH_SEARCH_PATHS` to the bundled “Frameworks” directory.

The only caveat (which I know about) with this is that you must target OS X 10.5 or newer. Fortunately 10.5 is quite old these days :smile:

See Dave Dribin’s post “[Using @rpath: Why and How](http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/)” and Mike Ash’s Friday Q&A “[Linking and Install Names](http://www.mikeash.com/pyblog/friday-qa-2009-11-06-linking-and-install-names.html)” for more info if needed.