Permalink
Browse files

Merge pull request #3 from rastersize/rpath

Use rpath for OS X frameworks and applications
  • Loading branch information...
2 parents 3cf7b88 + ac06290 commit 5361bcbf33f1257e62b1fa3c6bf858e9cd6633dd @jspahrsummers committed Jan 15, 2013
Showing with 9 additions and 4 deletions.
  1. +4 −0 Mac OS X/Mac-Application.xcconfig
  2. +5 −4 Mac OS X/Mac-Framework.xcconfig
@@ -13,3 +13,7 @@
// Whether function calls should be position-dependent (should always be
// disabled for library code)
GCC_DYNAMIC_NO_PIC = YES
+
+// Sets the @rpath for the application such that it can include frameworks in
+// the application bundle (inside the "Frameworks" folder)
+LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
@@ -14,7 +14,8 @@ DEAD_CODE_STRIPPING = NO
// disabled for library code)
GCC_DYNAMIC_NO_PIC = NO
-// Enables and requires the framework to be included in an application bundle
-// (inside the "Frameworks" folder)
-INSTALL_PATH = @executable_path/../Frameworks
-LD_DYLIB_INSTALL_NAME = @executable_path/../Frameworks/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME)
+// Enables the framework to be included from any location as long as the
+// loader’s runpath search paths includes it. For example from an application
+// bundle (inside the "Frameworks" folder) or shared folder
+INSTALL_PATH = @rpath
+LD_DYLIB_INSTALL_NAME = @rpath/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME)

0 comments on commit 5361bcb

Please sign in to comment.