From ba1488ec972d7abfc5cda14e2f0d90437c10fa91 Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Tue, 7 Oct 2014 10:46:05 +0200 Subject: [PATCH 1/2] Improve flexibility of dependencies locations on OS X - Replaced @executable_path by @rpath for more flexibility - Updated freetype and sndfile libs as follow: install_name_tool -id "@rpath/../Frameworks/freetype.framework/Versions/A/freetype" freetype install_name_tool -id "@rpath/../Frameworks/sndfile.framework/Versions/A/sndfile" sndfile --- CMakeLists.txt | 2 +- cmake/Macros.cmake | 2 +- .../freetype.framework/Versions/A/freetype | Bin 1668068 -> 1668068 bytes .../sndfile.framework/Versions/A/sndfile | Bin 6602736 -> 6602736 bytes 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 969779f0..011625aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -232,7 +232,7 @@ else() # NOTE: it's not required to link agains SFML.framework set_target_properties(SFML PROPERTIES BUILD_WITH_INSTALL_RPATH 1 - INSTALL_NAME_DIR "@executable_path/../Frameworks") + INSTALL_NAME_DIR "@rpath") # install rule install(TARGETS SFML diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 5e09a3cb..01a1f1da 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -84,7 +84,7 @@ macro(sfml_add_library target) # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks/application bundle set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 - INSTALL_NAME_DIR "@executable_path/../Frameworks") + INSTALL_NAME_DIR "@rpath") endif() # enable automatic reference counting on iOS diff --git a/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype b/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype index 5a62814ac97a729d8d5408fcd9200cc75b5fe3b1..831e8c418666ad978fa901649742613893518d02 100755 GIT binary patch delta 202 zcmZw9Ar8VY00qz%3T$*h2W?qREeS^;h#q2sklFcW3XhmxFdSeBmSmz=;Q&i!Fx-G2 zG~(IU4`n};PbuiTQ)0(-P6)|>0wL*-t8Rrnba(lR8<$+Yt-Yl%f-x|dz!YW>K^(lD uw;y^5O7I8MCrp3eW6+B4S>vMG84d|7Uf diff --git a/extlibs/libs-osx/Frameworks/sndfile.framework/Versions/A/sndfile b/extlibs/libs-osx/Frameworks/sndfile.framework/Versions/A/sndfile index 97defcc6a916b954be11db2367b544486f7f2aeb..f71a8532b80266c32c2e7a4eae983a8330b13a7e 100755 GIT binary patch delta 506 zcmZY4$uh%m0LSqpjjE;kM-oA7u{5ZCuhLNa8WgqHG9JJyIMkIf;{n{9%=D0pqX+Q< zW_okv+q1*xcm90~zfXYz-ZddVY=Y2tT@^d(X~! zwhRRUs3<`Yr3j%6<)}a*q_K|!93q1w9ODG1IKw$Eki{jg LaP150=IiwjmsNe9 delta 519 zcmZ|KxiSL*0LJm%&5AQDc3A{#9a;BH5X616;wEI1*cpYA8NDKn!ccesjnYhtZIm9w z3z$i#!1pg(yn3@&w9L;+3XOy6YPIRFgJ?KRr`Z0h(3}F}} z7{wUI5yk{2F@*@GF@sq|F^739U=d4L#tK%khIMRU6I Date: Tue, 7 Oct 2014 10:58:39 +0200 Subject: [PATCH 2/2] Updated Xcode templates Since the @loader_path was replaced with @rpath, to correctly load binaries from within a bundle app we need to add the Frameworks subdirectory to the run path list. --- .../templates/SFML/SFML Bundle.xctemplate/TemplateInfo.plist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/xcode/templates/SFML/SFML Bundle.xctemplate/TemplateInfo.plist b/tools/xcode/templates/SFML/SFML Bundle.xctemplate/TemplateInfo.plist index b3c3560a..fa13061d 100644 --- a/tools/xcode/templates/SFML/SFML Bundle.xctemplate/TemplateInfo.plist +++ b/tools/xcode/templates/SFML/SFML Bundle.xctemplate/TemplateInfo.plist @@ -127,6 +127,9 @@ subject to the following restrictions: INFOPLIST_FILE ___PACKAGENAME___/___PACKAGENAME___-Info.plist + + LD_RUNPATH_SEARCH_PATHS + @loader_path/../Frameworks