[Qt-interest] Linux Deployment using rpath and $ORIGIN
Joshua Grauman
jnfo-c at grauman.com
Mon Dec 13 18:23:32 CET 2010
Wow, thanks for all the info!
Josh
> On 2010-12-13 ITS-CMT-SUI-SL-SFR-FIN-DEV Knoll Oliver, ITS-CMT-SUI-SL-SFR-FIN-DEV wrote:
>
>> ...
>> For a given library:
>>
>> macx {
>> QMAKE_LFLAGS_SONAME = -Wl,-
>> install_name, at executable_path/../Frameworks/
>> DESTDIR = $$PWD/../bin/$${APP_NAME}.app/Contents/Frameworks
>> }
>>
>> !macx {
>> CONFIG += plugin
>> }
>> where APP_NAME is the name of the application (my own defined variable)
>> respective the <APP_NAME>.app bundle. That is @executable_path../Frameworks
>> is set as the "library identifier" and the library is copied into
>
> Just for completeness sake: the above lines are for dynamic libraries, but for the actual executable there is no further action required. It seems that on Mac the "@executable_path/../Frameworks" is the default for all executables, or qmake makes sure that "install_name_tool -change" is called properly upon the generated executable (http://doc.trolltech.com/4.7/deployment-mac.html).
>
> So with a few extra lines in the *.pro file for the library I am able to generate "application bundles with (my own) library dependencies" with a simple
>
> qmake
> make
>
> that is without any shell scripts calling install_name_tool etc. :)
>
> (The next step would then involve deploying the Qt Frameworks, e.g. by using the http://doc.trolltech.com/4.7/deployment-mac.html#the-mac-deployment-tool)
>
>
> Cheers, Oliver
> --
> Oliver Knoll
> Dipl. Informatik-Ing. ETH
> COMIT AG - ++41 79 520 95 22
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list