Diff
Modified: trunk/ChangeLog (128464 => 128465)
--- trunk/ChangeLog 2012-09-13 15:09:29 UTC (rev 128464)
+++ trunk/ChangeLog 2012-09-13 15:10:43 UTC (rev 128465)
@@ -1,5 +1,19 @@
2012-09-13 Tor Arne Vestbø <[email protected]>
+ [Qt] Ensure that QT is finalized before loading qt_module.prf
+
+ As qt_module.prf does dependency tracking based on the content of the
+ QT variable. The intermediate WebKit modules modify the variable in
+ their .pri files, so we have to ensure we've loaded all the modules
+ before loading qt_module.
+
+ Reviewed by Tor Arne Vestbø.
+ Patch by Oswald Buddenhagen <[email protected]> on 2012-09-13
+
+ * Source/api.pri:
+
+2012-09-13 Tor Arne Vestbø <[email protected]>
+
[Qt] Make sure LIBS, PKGCONFIG, and QT, do not affect QtWebKit's prl file
Unless it's actually a dependency of the public QtWebKit API.
Modified: trunk/Source/api.pri (128464 => 128465)
--- trunk/Source/api.pri 2012-09-13 15:09:29 UTC (rev 128464)
+++ trunk/Source/api.pri 2012-09-13 15:10:43 UTC (rev 128465)
@@ -4,13 +4,30 @@
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------
+# Use Qt5's module system
+load(qt_build_config)
+
TEMPLATE = lib
TARGET = QtWebKit
WEBKIT_DESTDIR = $${ROOT_BUILD_DIR}/lib
-# Use Qt5's module system
-load(qt_build_config)
+WEBKIT += wtf _javascript_core webcore
+
+build?(webkit1): WEBKIT += webkit1
+build?(webkit2): WEBKIT += webkit2
+
+# Ensure that changes to the WebKit1 and WebKit2 API will trigger a qmake of this
+# file, which in turn runs syncqt to update the forwarding headers.
+build?(webkit1): QMAKE_INTERNAL_INCLUDED_FILES *= WebKit/WebKit1.pro
+build?(webkit2): QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
+
+use?(3D_GRAPHICS): WEBKIT += angle
+
+# We load the relevant modules here, so that the effects of each module
+# on the QT variable can be picked up when we later load(qt_module).
+load(webkit_modules)
+
MODULE = webkit
MODULE_PRI = ../Tools/qmake/qt_webkit.pri
@@ -73,18 +90,6 @@
}
}
-WEBKIT += wtf _javascript_core webcore
-
-build?(webkit1): WEBKIT += webkit1
-build?(webkit2): WEBKIT += webkit2
-
-# Ensure that changes to the WebKit1 and WebKit2 API will trigger a qmake of this
-# file, which in turn runs syncqt to update the forwarding headers.
-build?(webkit1): QMAKE_INTERNAL_INCLUDED_FILES *= WebKit/WebKit1.pro
-build?(webkit2): QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
-
-use?(3D_GRAPHICS): WEBKIT += angle
-
qnx {
# see: https://bugs.webkit.org/show_bug.cgi?id=93460
# the gcc 4.4.2 used in the qnx bbndk cannot cope with
Modified: trunk/Tools/ChangeLog (128464 => 128465)
--- trunk/Tools/ChangeLog 2012-09-13 15:09:29 UTC (rev 128464)
+++ trunk/Tools/ChangeLog 2012-09-13 15:10:43 UTC (rev 128465)
@@ -1,3 +1,18 @@
+2012-09-13 Tor Arne Vestbø <[email protected]>
+
+ [Qt] Ensure that QT is finalized before loading qt_module.prf
+
+ As qt_module.prf does dependency tracking based on the content of the
+ QT variable. The intermediate WebKit modules modify the variable in
+ their .pri files, so we have to ensure we've loaded all the modules
+ before loading qt_module.
+
+ Reviewed by Tor Arne Vestbø.
+ Patch by Oswald Buddenhagen <[email protected]> on 2012-09-13
+
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/webkit_modules.prf: Added.
+
2012-09-13 Simon Hausmann <[email protected]>
[Qt] Fix build of Qt WTR/MiniBrowser with MSVC and nmake
Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (128464 => 128465)
--- trunk/Tools/qmake/mkspecs/features/default_post.prf 2012-09-13 15:09:29 UTC (rev 128464)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf 2012-09-13 15:10:43 UTC (rev 128465)
@@ -183,16 +183,6 @@
}
}
-# Reorder libraries so that the link and include order is correct,
-# and make sure the case matches the original case.
-libraries = WebKit1 WebKit2 WebCore ANGLE _javascript_Core WTF
-for(library, libraries) {
- contains(WEBKIT, $$lower($$library)) {
- WEBKIT -= $$lower($$library)
- WEBKIT *= $$library
- }
-}
-
defineTest(needToLink) {
# The main dynamic library always needs to link in the intermediate libraries
contains(TARGET, $$resolveFinalLibraryName($${QT.webkit.name})): return(true)
@@ -213,33 +203,17 @@
return(false)
}
-for(library, WEBKIT) {
- # Juggle LIBS to keep the static link order correct
- existing_libs = $$LIBS
- unset(LIBS)
+# Make sure we have loaded the relevant modules, so the include paths,
+# etc, are correct, and we can use WEBKIT.foo.dependent_libs below.
+load(webkit_modules)
- # We definitly need include paths and such (this will set
- # SOURCE_DIR to the right path so we can use it below).
- library_identifier = $$lower($$library)
- include(../modules/$${library_identifier}.prf)
-
- # More juggling
- dependent_libs = $$LIBS
- unset(LIBS)
-
- # But we might also need to link against it
- needToLink() {
+# We might need to link against the WebKit intermediate libraries
+needToLink() {
+ for(library, WEBKIT) {
+ library_identifier = $$lower($$library)
linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir))
- LIBS += $$dependent_libs
+ LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs)
}
-
- # Anything not linking dynamically to QtWebKit should make sure to have its export
- # macros syncrhonized with the code that it will be linked with statically.
- !contains(QT, webkit) {
- DEFINES += STATICALLY_LINKED_WITH_$$library
- }
-
- LIBS = $$existing_libs $$LIBS
}
# Sanitize PKGCONFIG and LIBS, as we don't want any of these libraries
Added: trunk/Tools/qmake/mkspecs/features/webkit_modules.prf (0 => 128465)
--- trunk/Tools/qmake/mkspecs/features/webkit_modules.prf (rev 0)
+++ trunk/Tools/qmake/mkspecs/features/webkit_modules.prf 2012-09-13 15:10:43 UTC (rev 128465)
@@ -0,0 +1,38 @@
+# -------------------------------------------------------------------
+# Used for applying the content of the WEBKIT variable into the
+# effect each library/module has on variables such as LIBS and QT.
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+# Reorder libraries so that the link and include order is correct,
+# and make sure the case matches the original case.
+libraries = WebKit1 WebKit2 WebCore ANGLE _javascript_Core WTF
+for(library, libraries) {
+ contains(WEBKIT, $$lower($$library)) {
+ WEBKIT -= $$lower($$library)
+ WEBKIT *= $$library
+ }
+}
+
+# Load the .pri file for each library, to pick up LIBS, INCLUDES,
+# and other dependencies the library adds.
+for(library, WEBKIT) {
+ # Juggle LIBS to keep the static link order correct
+ existing_libs = $$LIBS
+ unset(LIBS)
+
+ # We definitly need include paths and such (this will set
+ # SOURCE_DIR to the right path so we can use it below).
+ library_identifier = $$lower($$library)
+ include(../modules/$${library_identifier}.prf)
+
+ # More juggling, so that we can add the dependent libs later
+ # on if we decide that we need to link to the library.
+ eval(WEBKIT.$${library_identifier}.dependent_libs = $$LIBS)
+ LIBS = $$existing_libs
+
+ # Anything not linking dynamically to QtWebKit should make sure to have its export
+ # macros synchronized with the code that it will be linked with statically.
+ !contains(QT, webkit): DEFINES += STATICALLY_LINKED_WITH_$$library
+}