OSX/Introjucer: Injecting dependencies into bundle


#1

Hey everyone,

our app(s) depend on some libraries, some of which we built ourselves. Those libs need to be injected into the .app bundle (for example in XYZ.app/Contents/Frameworks/), they are already built with the right rpath (@executable_path/…/Frameworks/libname.dylib). Now I’m wondering how to combine this with the introjucer. If there was a post-build script I could run I could just copy the libs into the right location, but there isn’t. So: is there another option to do this?

  • bram

#2

I almost got this working with @rpath instead of @executable_path but there is still trouble:

for running from xcode I would be able to set the rpath in xcode as:

($SRCROOT)/…/…/path/to/my/dll
AND
@executable_path/…/Frameworks/libname.dylib

The first would then be when debugging from xcode (however Juce defines the SRCPATH relative, not absolute, so I’m lost again), the second could then be for when I distribute the application, i.e. including the libraries in the application bundle.
Is there any reason why Juce defines SRCROOT as a relative path where as xcode defines an absolute SRCPATH by default?

  • bram