I have an application "Foo" which distributes a plugin for a separate 
application "Bar".  My plugin is dependent on libraries distributed with 
application "Foo".  When application "Bar" tries to load the plugin, the plugin 
will not load, as it cannot find the libraries distributed with "Foo".

As far as I can tell this boils down to the @executable_path reference which 
fixup_bundle inserts into my binaries.

>otool -L plugin.dylib
@executable_path/../MacOS/libsomedependency.dylib
@executable_path/../MacOS/libsomeotherdependency.dylib
etc...

When application "Bar" loads my plugin, I'm assuming that @executable_path 
resolves to the location of "Bar", but the plugin's dependent libraries are in 
Foo.app/Contents/MacOS, not in Bar.app/Contents/MacOS.

All this leads me to believe that I should be using @loader_path or @rpath 
instead, but I don't see a way to do this using CMake as it appears that 
BundleUtilities.cmake and GetPrerequisites.cmake are hardcoded to use 
@executable_path.

Any advice would be greatly appreciated.

Thanks!
Scott

________________________________
This e-mail and any files transmitted with it are confidential and are intended 
solely for the use of the individual or entity to whom they are addressed. If 
you are NOT the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, be advised that you have received this e-mail 
in error and that any use, dissemination, forwarding, printing or copying this 
e-mail is strictly prohibited.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to