summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-04-18 12:55:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-19 11:45:48 +0200
commit6dbfbbccf4dc71756f59bb828a008cb96002e248 (patch)
tree39f6f934235113dad012e354aaf6de076bf67156
parent018937c7ba8b9afb85b8ae7ccb2aba438768cdf5 (diff)
downloadqtwebkit-6dbfbbccf4dc71756f59bb828a008cb96002e248.tar.gz
[Qt][Mac] QtWebKitWidgets has wrong install_name.
http://trac.webkit.org/changeset/136384 This part got lost during the library split. It was done for QtWebKit before, but it also needs to be applied to QtWebKitWidgets. Reviewed by Tor Arne Vestbø. Change-Id: I4a9249cd97ac03b639282239927dc4867d058b0b Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r--Source/widgetsapi.pri28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/widgetsapi.pri b/Source/widgetsapi.pri
index 96db91589..0e7b44be2 100644
--- a/Source/widgetsapi.pri
+++ b/Source/widgetsapi.pri
@@ -74,6 +74,34 @@ load(qt_module)
# Allow doing a debug-only build of WebKit (not supported by Qt)
macx:!debug_and_release:debug: TARGET = $$BASE_TARGET
+# Make sure the install_name of the QtWebKit library point to webkit
+force_independent:macx {
+ # We do our own absolute path so that we can trick qmake into
+ # using the webkit build path instead of the Qt install path.
+ CONFIG -= absolute_library_soname
+ QMAKE_LFLAGS_SONAME = $$QMAKE_LFLAGS_SONAME$$WEBKIT_DESTDIR/
+
+ !debug_and_release|build_pass {
+ # We also have to make sure the install_name is correct when
+ # the library is installed.
+ change_install_name.depends = install_target
+
+ # The install rules generated by qmake for frameworks are busted in
+ # that both the debug and the release makefile copy QtWebKit.framework
+ # into the install dir, so whatever changes we did to the release library
+ # will get overwritten when the debug library is installed. We work around
+ # that by running install_name on both, for both configs.
+ change_install_name.commands = framework_dir=\$\$(dirname $(TARGETD)); \
+ for file in \$\$(ls $$[QT_INSTALL_LIBS]/\$\$framework_dir/$$BASE_TARGET*); do \
+ install_name_tool -id \$\$file \$\$file; \
+ done
+ default_install_target.target = install
+ default_install_target.depends += change_install_name
+
+ QMAKE_EXTRA_TARGETS += change_install_name default_install_target
+ }
+}
+
SOURCES += \
$$PWD/WebKit/qt/WidgetApi/qgraphicswebview.cpp \
$$PWD/WebKit/qt/WidgetApi/qwebframe.cpp \