Skip to content

Commit 768b431

Browse files
committed
Use @rpath for framework target
To use as framework set LD_RUNPATH_SEARCH_PATHS = @load_path/Versions/A/Frameworks @executable_path/../Frameworks in the final application no matter how deeply nested this framework is.
1 parent 0e81ed4 commit 768b431

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

Outsourced/OAuth2Client

SoundCloudAPI.xcodeproj/project.pbxproj

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@
337337
94535F82123FAFDF00BD668A /* Resources */,
338338
94535F83123FAFDF00BD668A /* Sources */,
339339
94535F84123FAFDF00BD668A /* Frameworks */,
340-
99F799A613A1431F002555F0 /* Change Framework Install Names (Script) */,
341340
);
342341
buildRules = (
343342
);
@@ -425,23 +424,6 @@
425424
};
426425
/* End PBXResourcesBuildPhase section */
427426

428-
/* Begin PBXShellScriptBuildPhase section */
429-
99F799A613A1431F002555F0 /* Change Framework Install Names (Script) */ = {
430-
isa = PBXShellScriptBuildPhase;
431-
buildActionMask = 2147483647;
432-
files = (
433-
);
434-
inputPaths = (
435-
);
436-
name = "Change Framework Install Names (Script)";
437-
outputPaths = (
438-
);
439-
runOnlyForDeploymentPostprocessing = 0;
440-
shellPath = /bin/sh;
441-
shellScript = "for frameworkName in OAuth2Client\ndo\necho \"install_name_tool -change @executable_path/../Frameworks/${frameworkName}.framework/Versions/A/${frameworkName} @executable_path/../Frameworks/SoundCloudAPI/Frameworks/${frameworkName}.framework/Versions/A/${frameworkName} $TARGET_BUILD_DIR/SoundCloudAPI.framework/SoundCloudAPI\"\n\ninstall_name_tool -change \"@executable_path/../Frameworks/${frameworkName}.framework/Versions/A/${frameworkName}\" \"@executable_path/../Frameworks/SoundCloudAPI/Frameworks/${frameworkName}.framework/Versions/A/${frameworkName}\" \"$TARGET_BUILD_DIR/SoundCloudAPI.framework/SoundCloudAPI\"\ndone";
442-
};
443-
/* End PBXShellScriptBuildPhase section */
444-
445427
/* Begin PBXSourcesBuildPhase section */
446428
94535F83123FAFDF00BD668A /* Sources */ = {
447429
isa = PBXSourcesBuildPhase;
@@ -573,7 +555,7 @@
573555
GCC_PRECOMPILE_PREFIX_HEADER = YES;
574556
GCC_PREFIX_HEADER = Sources/SoundCloudAPI_Prefix.pch;
575557
INFOPLIST_FILE = "SoundCloudAPI.framework-Info.plist";
576-
LD_DYLIB_INSTALL_NAME = "@executable_path/../Frameworks/$(EXECUTABLE_PATH)";
558+
LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
577559
MACOSX_DEPLOYMENT_TARGET = 10.5;
578560
OTHER_CFLAGS = "-DNX_BLOCKS_AVAILABLE=1";
579561
OTHER_LDFLAGS = (
@@ -601,7 +583,7 @@
601583
GCC_PRECOMPILE_PREFIX_HEADER = YES;
602584
GCC_PREFIX_HEADER = Sources/SoundCloudAPI_Prefix.pch;
603585
INFOPLIST_FILE = "SoundCloudAPI.framework-Info.plist";
604-
LD_DYLIB_INSTALL_NAME = "@executable_path/../Frameworks/$(EXECUTABLE_PATH)";
586+
LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
605587
MACOSX_DEPLOYMENT_TARGET = 10.5;
606588
OTHER_CFLAGS = (
607589
"-DNS_BLOCK_ASSERTIONS=1",

0 commit comments

Comments
 (0)