summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 \