[Development] Qt 4.x and Qt 5 frameworks should use @rpath (QTBUG-31814)

Adam Strzelecki ono at java.pl
Tue Aug 12 16:25:01 CEST 2014


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

Regards,
-- 
Adam


More information about the Development mailing list