views:

7

answers:

0

I have an XCode project consisting of three targets. A Cocoa application, and two shared libraries (as .dylibs). The one .dylib file implements some core framework functionality and goes into the same directory as the .app The other .dylib is a plugin, and goes into a Plugins folder.

So I have setup the Per-configuration build Products path for the .app and framework.dylib to be $(BUILD_DIR)/$(CONFIGURATION) And the plugin.dylib builds to $(BUILD_DIR)/$(CONFIGURATION)/Plugins

My problem is, the plugin now needs to use the framework dylib, but when I add "libFramework.dylib" to the Plugins "Linked Libraries" setting in the General tab of Plugin's Info I get a build error:

ld: library not found for -lframework

I could add a new copy files build phase to move plugin.dylib into the plugins folder, but then its internal reference to framework would be to ./framework.dylib, not ../framework.dylib

I know how to correct that from the command line - but I'm hoping there are some in-XCode settings where I can get the relative pathing setup without resorting to using Terminal or scripts to execute a after-xcode-build-but-before-xcode-run fixup to make the plugin load successfully.