[Interest] Deploying Qt to macOS still...errr, sucks?

Prashanth Udupa prashanth.udupa at gmail.com
Fri Nov 11 10:47:28 CET 2016


Hi Jake,


> > install_name_tool -id @executable_path/../Frameworks/externalLib.dylib
> MyWonderfulApp.app/Contents/Frameworks/externalLib.dylib
>
> Don't do that last install_name_tool command. Instead, build your dynamic
> library with:
> in qmake...
>         QMAKE_SONAME_PREFIX = @rpath (which is equivalent to QMAKE_LFLAGS
> += -Wl,-install_name, at rpath/externalLib.dylib)
> or in qbs...
>         cpp.sonamePrefix: "@rpath"
>

In my case, I use an external-lib provided by someone else. I cannot
rebuild it from source code - I can only link to it. Its available in
/usr/local/lib folder on my Mac while building. But it needs to be included
in the app-bundle for deployment.

In anycase, I did not know about QMAKE_SONAME_PREFIX. This is good, thanks!


> and build your main application and command line helper tool with:
> in qmake...
>         QMAKE_RPATHDIR += @loader_path/../Frameworks (which is equivalent
> to QMAKE_LFLAGS += -Wl,-rpath, at loader_path/../Frameworks)
> or in qbs...
>         cpp.rpaths: ["@loader_path/../Frameworks"]
>

I did not know this either. Thanks!

Thanks,
Prashanth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161111/3cd61a2e/attachment.html>


More information about the Interest mailing list