[Development] Qt 4.x and Qt 5 frameworks should use @rpath (QTBUG-31814)
Sorvig Morten
Morten.Sorvig at digia.com
Tue Aug 12 17:46:44 CEST 2014
> On 12 Aug 2014, at 16:25, Adam Strzelecki <ono at java.pl> wrote:
>
> Okay, Phase II.
>
> (1) Introduce "bundle_frameworks" CONFIG option, and set it default for "rpath" shared builds on iOS & OS X
>
> (2) Introduce "bundle" make target, when "bundle_frameworks" CONFIG is set, it is added to "all"
>
> (3) Make's "bundle" will copy (update if not there) all used Qt frameworks to app's bundle Frameworks and used plugins to Plugins (currently implemented as separate macdeployqt)
>
> NOTES:
>
> * Since qmake knows which Qt libraries and plugins are used "bundle" target it will generate following Makefile entries
>
> all: Sample.app bundle
>
> bundle: Sample.app/Frameworks/QtCore.framework
> mkdir -p Sample.app/Frameworks && cp -r $$[QT_INSTALL_LIBS]/QtCore.framework Sample.app/Frameworks
> ...
>
> Of course this example is simplification, since we don't need to copy headers and we need to take debug versions or release. So there will be more commands in practice.
>
> * One can disable "bundle_frameworks" via CONFIG -= bundle_frameworks, so existing workflow where executable is given rpath pointing to Qt libraries
>
> * If disabled, one can still do "make bundle" that is equivalent to current "macdeployqt" and "bundle" target will also add "install_name_tool" -rpath replacement steps
A few quick comments:
The target name: Should that be “deploy”? “make deploy" would then perform platform-specific deployment.
Options: currently macdeployqt has options, and I can see more being added. We would need to find a way to provide them via the build system.
Default behavior: I’m on favor of keeping it opt-in, either via "CONFIG += bundle_frameworks" or “make bundle”
Morten
More information about the Development
mailing list