Page 1 of 1

How to distribute ImageMagick libraries in a Mac App bundle

Posted: 2017-10-04T05:08:11-07:00
by sztepen
I am trying to distribute ImageMagick (C++) with my Mac app.

I tried building the binaries using MacPorts as well as directly from source with CMake.

The resultant .dylib pathnames (as seen with otools -L) are absolute and relate to specific local folders, such as "opt/local" or "usr/local".

This makes the app crash on end-user's computer.

I would like to set the dylib pathnames to @rpath or @executable_path so that I can ship the dylibs within the bundle, and the app itslef can find them using default search paths.

Currently I am lost, tried to change the CMake config parameters, to no avail.